The fact that f( ++$n, ++$n ) passes an alias to $n, rather than the value resulting from the preincrement, is just another broken behaviour.Note that this behaviour isn't unique to ++.
sub f {say "@_"} my $n = 1; f $n += 2, $n += 2; __END__ 5 5
In reply to Re^4: Pre vs Post Incrementing variables
by JavaFan
in thread Pre vs Post Incrementing variables
by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |