$b++ needs to create a new anonymous scalar because the result is different than the $b.
++$b just returns a pointer to $b.
$ perl -le'my $b = 4; $r = \( $b++ ); $$r = 20; print $b' 5 $ perl -le'my $b = 4; $r = \( ++$b ); $$r = 20; print $b' 20
In reply to Re^4: Summing Up Array Elements By Group
by ikegami
in thread Summing Up Array Elements By Group
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |