D
Dan Jacobson
Idea: -w or -W should warn if one uses ++, -- modifying a variable
twice in the same statement, as noted on perlop, else users might
think:
Should one feel bad about the apparent disorder?
$ perl -wle 'print $m++,$m,$m++'
021 #Hmm, that 2 should be 1?
Same also if one uses $m++,$m,$m++ in perlform's formats.
$ perl -wle 'print $m++ + $m + $m++'
2 #OK with me.
Moral: maybe ++ only safe with the = operator?:
$ perl -wle '$e=$m++.$m.$m++; print $e'
011
twice in the same statement, as noted on perlop, else users might
think:
Should one feel bad about the apparent disorder?
$ perl -wle 'print $m++,$m,$m++'
021 #Hmm, that 2 should be 1?
Same also if one uses $m++,$m,$m++ in perlform's formats.
$ perl -wle 'print $m++ + $m + $m++'
2 #OK with me.
Moral: maybe ++ only safe with the = operator?:
$ perl -wle '$e=$m++.$m.$m++; print $e'
011