in reply to Re: What is true and false in Perl?
in thread What is true and false in Perl?
Another one that's false is a list of undefs. An array of undefs though is true.
We make use of this like so:if ( (undef,undef) ) { } # a list of undefs is false @arr = (undef,undef); if ( @arr ) {} # an array of undefs is true
mc0e$_ = 'x'; if (($a,$b) = m/(.)(.)/) { }
In Section
Tutorials