develooper Front page | perl.beginners | Postings from August 2009

Re: source code for builtin functions

Thread Previous | Thread Next
Paul Johnson
August 27, 2009 16:29
Re: source code for builtin functions
Message ID:
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:
> Perhaps you should take your question to the Perl5Porters list  
>  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 -

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About