These are functionally the same, but map generates a return value that can be assigned to another array, and foreach does not, therefore map is not appropriate.There are also situations where forech aren't appropriate. Like:
But I respect this way of coding 'cause TMOWTDI.foreach(@array){ push(@tmp, $_) if(/$regex/); }
In reply to Re: Re: Re: Using s///e and it just doesn't feel right
by kral
in thread Using s///e and it just doesn't feel right
by rkg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |