Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How to create hash out of an array elements?

by ansh batra (Friar)
on Nov 17, 2011 at 09:38 UTC ( #938565=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @arr=(1,2,3,4,5,6,7,8,9,10);
    %hsh= ();
    ...
            print "$key => $value\n";
        }
    
  2. or download this
    1 => 2
    3 => 4
    7 => 8
    9 => 10
    5 => 6
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-09-26 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (117 votes). Check out past polls.

    Notices?