Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Perl-ish way to create hash from array

by kennethk (Monsignor)
on Jul 09, 2013 at 17:30 UTC ( #1043360=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %csvColumns = map {$csvColumns[$_] => $_} 0 .. $#csvColumns;
    
  2. or download this
    my %csvColumns = do {my $i = 0; map {$_ => $i++} @csvColumns};
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-11-23 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (131 votes), past polls