http://www.perlmonks.org?node_id=1033095

konnjuta has asked for the wisdom of the Perl Monks concerning the following question:

Suppose I have the following input:
STORE PRODUCT_ID ==================== Sydney 12 Sydney 14 Canberra 12 Canberra 18
To create a hash that will allow me to determine if a store has a product I can use:
my %hash; $hash{(split)[0]}{(split)[1]} = 1 foreach <>;
How can I achieve a similar result using map?