Next | Tricks of the Wizards | 119 |
sub foo { ... return undef; # False }
if (@result = foo(...)) { ... }
Oops. undef is not false in a list context!
@result has one element, which is undef
if (@result) { ... } # Yes!
Next | Copyright © 2003 M. J. Dominus |