Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Array to Hash

by btrott (Parson)
on May 10, 2000 at 20:29 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-04-19 13:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found