Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Having a problem creating a hash with the map function

by choroba (Canon)
on Nov 29, 2012 at 17:13 UTC ( #1006309=note: print w/ replies, xml ) Need Help??


in reply to Having a problem creating a hash with the map function

Others already told you how you could change the data structures. If you are still curious how to get the original hash, try this:

my $skip_first; my %Belfast_car_dealer_hash = map { $skip_first++ ? ($_ => 1) : () } @{ $car_city_dealer_aoa[0] }; print Dumper \%Belfast_car_dealer_hash;
I also noticed the script is missing warnings turned on.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Having a problem creating a hash with the map function
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006309]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (21)
As of 2015-07-31 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls