use strict; use Data::Dumper; my %h = ( foo => 'bar', baz => 'weeble', ); my @remove = 'baz'; my %removed; @removed{ @remove } = delete @h{ @remove }; print Dumper \%h; print Dumper \%removed;
In reply to Re^3: Hash Splice
by Corion
in thread Hash Splice
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |