in reply to the ? : operator : a bug ?

Argh! Don't use ?: in a void context. Rewrite that as a normal if/else, or as:
$wml = defined(%stores) ? ... : ...;

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: the ? : operator : a bug ?
by Sihal (Pilgrim) on Nov 21, 2002 at 14:32 UTC
    oops. I often use it the way I showed above as a shortcut, but I realize now why it's wrong.
    Thanks.