http://qs1969.pair.com?node_id=11140027


in reply to Re^2: One-liner to join keys on a two-dimensionnal hash ?
in thread One-liner to join keys on a two-dimensionnal hash ?

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: