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

Re: Array to Hash

by btrott (Parson)
on May 10, 2000 at 20:29 UTC ( #10990=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my @array = qw/foo bar baz quux/;
    
        my %hash;
        @hash{@array} = (1) x @array;
    
  2. or download this
        @hash{@array} = ();
    
  3. or download this
        print "foo is there" if exists $hash{foo};
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2022-10-05 21:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (25 votes). Check out past polls.

    Notices?