Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Bulk Hash Assignment

by premchai21 (Curate)
on Apr 17, 2002 at 17:07 UTC ( [id://159900]=note: print w/replies, xml ) Need Help??


in reply to Bulk Hash Assignment

YAWTDI -- you could use an anonymous function...

sub { for(map{$_*2} 0..$#_/2) { $bfb->{$_[$_+1]} = $ofb{$_[$_]} }}->(q +w[camshaft camshaft ...]);

Or, alternatively:

sub { my%g=@_; for(keys%g) { $bfb->{$g{$_}} = $ofb{$_} }}->(qw[camshaf +t camshaft ...]);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 18:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found