in reply to Printing a reference to the output of map

maybe you want
print Dumper [map {$_ => get_day_name($_)} <DATA>];
map returns a list. The []'s return a reference to an anonymous array created from that list.

Update I should have read the question more closely. He does want a hash back. See clintp's response.

Replies are listed 'Best First'.
Re: Re: Printing a reference to the output of map
by clintp (Curate) on Dec 01, 2001 at 03:30 UTC
    map's returning a list all right: in this case a list of paired elements. It's perfectly acceptable to dump this "list" directly into a hash.