use Data::Dumper; %hash = ( 'foo' => [1,2,3], 'bar' =>[3,4,5]); my $wanted = {}; # create reference to anonymous hash $wanted->{foo} = $hash{foo}; # assignment print Dumper($wanted);
In reply to Re: Hash Splice
by perlfan
in thread Hash Splice
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |