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 $
In reply to Re^3: Refactoring: dumb or witty use of ternary operator?
by revdiablo
in thread Refactoring: dumb or witty use of ternary operator?
by PetaMem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |