On Wed, Dec 05, 2001 at 05:11:43AM -0500, Michel Lambert wrote: > > defined $flag && !$flag > > So, who does better? > > > defined ($var = $flag) && !$var > > $flag is only evaluated once. :)
But Bart said he wanted to test for 0. The test above, and several of
the other proposals don't distinguish between 0 and the empty string.
do {no warnings; not local $_ = $flag and length};
Abigail
