in reply to Re^3: Turning foreach into map?
in thread Turning foreach into map?

In theory, the only difference between map and for/foreach now is a matter of taste/style.
And the ability to have a named variable as your index.

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^5: Turning foreach into map?
by Anonymous Monk on Apr 06, 2005 at 08:48 UTC
    And the context of the (last) expression in the block. For for, it's in void context, for grep it's in scalar context, for map it's in list context.