Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl-ish way to create hash from array

by moritz (Cardinal)
on Jul 09, 2013 at 17:29 UTC ( #1043358=note: print w/replies, xml ) Need Help??


in reply to Perl-ish way to create hash from array

Maybe you want to use a hash slice slice:
my %csvColumns; @csvColumns{@csvColumns} = (0..$#csvColumns);

Or you can the combination of $csvParser->column_names(@csvColumns) and $csvParser->getline_hr to obtain a hash ref from the Text::CSV module directly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043358]
help
Chatterbox?
[choroba]: It's been reported before
[Discipulus]: ok no big deal anyway..
[Discipulus]: mmh choroba.. my post is not for you, if you do not want your golfing game somehow spoilered for one of the problems. Adviced! ;=)
[Discipulus]: no that i aim to victory anyway..

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-10-22 19:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (275 votes). Check out past polls.

    Notices?