Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by choroba (Bishop)
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.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006309]
help
Chatterbox?
[ovedpo15]: how fast and a good way to print error if more than one out of three variables are defined? for example if there are $a $b $c. I want that if for example $a and $b are defined - print error (also for $a and $c or $b and $c)
[ovedpo15]: its easy with three "if"s or one long "if" but is there a "nice" way :)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-04-22 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?