For complex expressions, foreach can always be made more readable than map, because foreach lets you explicitly name the variable that stores each element from the list you're iterating over.
foreach my $foo (@array) {... $foo ...} map {my $foo = $_; ... $foo ...} @array
In reply to Re^4: "advanced" Perl functions and maintainability
by Anonymous Monk
in thread "advanced" Perl functions and maintainability
by geektron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |