On Thu, Aug 27, 2009 at 06:34:53PM -0400, Shawn H. Corey wrote: > Telemachus wrote: >> On Thu Aug 27 2009 @ 2:40, heyi xiao wrote: >>> I knew perl is written in C, but I am still interested in >>> checking the C source for some builtin function directly. Is there any good way >>> to go? >> >> If you browse to this site, you can download the source code for whatever >> version of Perl you're working with and read away: >> >> http://www.cpan.org/src/README.html > > Perhaps you should take your question to the Perl5Porters list > http://www.perlfoundation.org/perl5/index.cgi?perl5_porters After all, > they're the ones who maintain it. I don't think there's any need for that. I also don't think this is an inappropriate question for this list or that the C code is particularly ugly for that matter, but there you go. Anyway, to answer your question, get the code from the link above and look at pp*.c. reverse(), taking your example, can be found by searching for pp_reverse in pp.c. If you are serious about understanding the code you'll also want to read pod/perlguts.pod. Good luck, -- Paul Johnson - paul@pjcj.net http://www.pjcj.netThread Previous | Thread Next