in reply to Re^2: Expression form of map or grep
in thread Expression form of map or grep
In the code as shown, "map" just melds in the array reference construction. Perhaps that is what you prefer.
I personally would either make a temporary variable to hold the map result; or rearrange the code to highlight map function. On the second note ...
'troll' => [ 'troll', map( "$_ troll", qw(desert freshwater giant ice saltwater snow spectr +al), 'two-headed' ), 'trobold', @$tralg, @$throglin ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Expression form of map or grep
by Lady_Aleena (Priest) on Jul 13, 2020 at 10:39 UTC | |
by parv (Parson) on Jul 14, 2020 at 04:24 UTC | |
by Lady_Aleena (Priest) on Jul 14, 2020 at 12:19 UTC | |
by afoken (Chancellor) on Jul 14, 2020 at 23:25 UTC |