I was meditating if map should be changed in this respect.
Questions:
DB<111> @b = map {my $x=$_; ++$x} @a => (2 .. 11) DB<112> @a => (1 .. 10)
Then again its pretty easy to replace ++$_ with $_+1 and s/x/y/ with s/x/y/r in current Perl versions.
Not sure if there are any modifying operators left without a non-modifying counterpart.
In reply to Re^4: map vs for\foreach.
by LanX
in thread map vs for\foreach.
by builat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |