in reply to Re^2: Refactoring: dumb or witty use of ternary operator?
in thread Refactoring: dumb or witty use of ternary operator?

Neither methods generate a warning for me, using perl 5.8.4.

$ perl -wle '$outhash{$ARGV[0]}++; print $outhash{$ARGV[0]}' foo 1 $ perl -wle '$outhash{$ARGV[0]} ? ($outhash{$ARGV[0]}++) : ($outhash{$ARGV[0]} = 1); print $outhash{$ARGV[0]}' foo 1 $