Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: converting ana array to a hash

by simeon2000 (Monk)
on Jul 24, 2002 at 13:22 UTC ( [id://184818]=note: print w/replies, xml ) Need Help??


in reply to converting ana array to a hash

First one is pretty simple:

my %hash = (); my @array = qw /fred jim john joe/; @hash{ @array } = @array;

... since you're not worried about the values ;)

"Falling in love with map, one block at a time." - simeon2000

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found