(i.e. one for each element supplied in the "input" list)
That's usually what happens but you can produce more than one "output" for each "input", like this for example
$ perl -le ' -> @list = map { ($_ - 1, $_, $_ + 1) } 3, 6, 9; -> print qq{@list};' 2 3 4 5 6 7 8 9 10 $
Cheers,
JohnGG
In reply to Re^2: map and grep
by johngg
in thread map and grep
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |