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
zz zZ Z Z #!perl
|
---|
In Section
Seekers of Perl Wisdom