P is for Practical | |
PerlMonks |
Re: chomp it chomp it goodby sflitman (Hermit) |
on Jun 03, 2009 at 05:26 UTC ( [id://767892]=note: print w/replies, xml ) | Need Help?? |
It uses Magic.
If you check the perl source, you'll see that it is implemented as Perl_do_chomp in doop.c and it takes a pointer to an SV (which is fed to it from the top of the stack down since chomp can take multiple arguments) and that pointer is the C equivalent of a reference. St. Larry be praised, there is much magic to make our lives easier in Perl.
HTH,
In Section
Seekers of Perl Wisdom
|
|