"I strictly reserve map for coercion of a set of FOO items into a set of BAR items (@lista -> map -> @listb)..."
And i don't understand why you insist on this.
Just because there must be an example:
#!/usr/bin/env perl use strict; use warnings; use Data::Dump; my @foo = ( 1 .. 10 ); dd \@foo; my @bar = map { ++$_ } @foo; dd \@foo; dd \@bar;
So why is map { ++$_ } @foo; wrong?
I vaguely remember that there where some performance issues...patched?
Best regards, Karl
«The Crux of the Biscuit is the Apostrophe»
In reply to Re^2: map vs for\foreach.
by karlgoethebier
in thread map vs for\foreach.
by builat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |