Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl-ish way to create hash from array

by kennethk (Abbot)
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 browsing the Monastery: (12)
As of 2015-09-04 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (140 votes), past polls