in reply to warning! -- Why?

G'day jwkrahn,

It's a common mistake to forget, or not realise, that "&&" has a higher precedence than "=" which, in turn, has a higher precedence than "and". See "perlop: Operator Precedence and Associativity" (there's a table at the end of that section which lists the order of precedence).

Changing "and" to "&&" gets rid of the warning; however, in this instance, that's probably not what you want. Compare these two:

$ perl -MO=Deparse,-p -e '($used_options{ $1 } = 1 and "\${$1}")' (($used_options{$1} = 1) and ("\${$1}")); $ perl -MO=Deparse,-p -e '($used_options{ $1 } = 1 && "\${$1}")' ($used_options{$1} = "\${$1}");

— Ken