laziness, impatience, and hubris | |
PerlMonks |
Re: Empty List miracle(1)by Sandy (Curate) |
on Apr 29, 2010 at 13:46 UTC ( [id://837543]=note: print w/replies, xml ) | Need Help?? |
If I understand things correctly: qw,, in scalar context returns undef, however in list context (assigning to an array), it will set the array to an empty array. Similarly for (). The real issue here is the differences between returning data in list and scalar context. So, if you substitute your print statements for these, you will get '0' printed 3 times.
In Section
Seekers of Perl Wisdom
|
|