http://qs1969.pair.com?node_id=999577


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.
if ( (undef,undef) ) { } # a list of undefs is false @arr = (undef,undef); if ( @arr ) {} # an array of undefs is true
We make use of this like so:
$_ = 'x'; if (($a,$b) = m/(.)(.)/) { }
mc0e