Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 cooling their heels in the Monastery: (4)
As of 2022-08-12 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?