Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Re: setting hash keys by array

by fruiture (Curate)
on Sep 09, 2002 at 17:55 UTC ( [id://196371]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: setting hash keys by array
in thread setting hash keys by array

Why not:

my @chain = qw/a b c d/; my %hash; sub foo(\%@){ local $_ = shift; $_ = $_->{scalar shift} = {} while @_; } foo %hash => @chain;

? it's becoming obfuscated ...

--
http://fruiture.de

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-26 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found