Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: using List::MoreUtils::zip with anon arrays ?

by nothingmuch (Priest)
on Aug 30, 2006 at 12:22 UTC ( #570367=note: print w/ replies, xml ) Need Help??


in reply to Re^2: using List::MoreUtils::zip with anon arrays ?
in thread using List::MoreUtils::zip with anon arrays ?

Yes, slices are awesome.

Another little known feature of hash slices is that they are localizable:

use Data::Dumper; my %hash = ( foo => 1, bar => 2 ); warn Dumper(\%hash); { local @hash{qw/bar moose/} = qw/happy joy/; warn Dumper(\%hash); } warn Dumper(\%hash); __END__ $VAR1 = { 'bar' => 2, 'foo' => 1 }; $VAR1 = { 'bar' => 'happy', 'moose' => 'joy', 'foo' => 1 }; $VAR1 = { 'bar' => 2, 'foo' => 1 };
-nuffin
zz zZ Z Z #!perl


Comment on Re^3: using List::MoreUtils::zip with anon arrays ?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-12-20 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls