I didn't know that map could be used such a way (i.e. having an output instead of altering every item in a list)
Erm, that is what map is for! :) Perl::Critic even provides a ProhibitVoidMap policy to warn you of code that uses map in void context.
I suggest you follow the simple stylistic advice given in Effective Perl Programming in the item "Use foreach, map and grep as appropriate" namely:
In reply to Re^3: One-liner to join keys on a two-dimensionnal hash ?
by eyepopslikeamosquito
in thread One-liner to join keys on a two-dimensionnal hash ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |