in reply to Can't understand function returning undefs
if( ()=(0,0) ) { print "sometimes you're counting the things in the list and getting +2.\n" } if( (0,0) ) { print "sometimes you're applying the comma operator and getting und +ef (last)\n"; }
if is going to boolean test, so it's rather like this:
use Data::Dumper; print Dumper({ test1=>scalar( 7,13 ), test2=>scalar( ()=(7,13) ) }), " +\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Can't understand function returning undefs
by rg0now (Chaplain) on Sep 24, 2010 at 20:43 UTC | |
by AnomalousMonk (Archbishop) on Sep 24, 2010 at 21:24 UTC | |
by rg0now (Chaplain) on Sep 24, 2010 at 21:32 UTC | |
by tye (Sage) on Sep 24, 2010 at 21:01 UTC | |
by ikegami (Patriarch) on Sep 24, 2010 at 21:55 UTC |
In Section
Seekers of Perl Wisdom