testing testing... perl question

Ovid publiustemp-londonpm at yahoo.com
Mon Aug 13 13:30:35 BST 2007


--- Aidan Samuel <aidan.samuel at gmail.com> wrote:

> Aahhhh, I get it now!

I'm surprised no one appears to have mentioned the B::Deparse module
yet:

$ perl -MO=Deparse -e '@a = (1..5); print sort $a <=> $b, @a;'
@a = 1..5;
print sort($a <=> $b, @a);
-e syntax OK

This clearly shows that Perl is not parsing the code the way you
expected it to.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/


More information about the london.pm mailing list