On Wed, Dec 05, 2001 at 10:43:14AM +0100, Sven Neuhaus wrote:
> Looks like "~" doesn't trigger a warning on undef.
> 
> So
> ~$a ? $a ? 3 : 2 : 1
> 
> will yield 3 for true, 2 for false, 1 for undef.

That's no good, repetition of the expression is a no-no.

    Note that "$flag" may well be an expression, so repetition as in
    the next, is not good:

            defined $flag && !$flag



-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
But I wore the juice!

Reply via email to