in reply to Hash/Array slice : how to exclude items?

A while ago I whipped up Tie::Subset::Hash, and I took this oppertunity (and the inspiration from Discipulus's node) to expand upon that with Tie::Subset::Hash::Masked:

use Data::Dumper; use Tie::Subset::Hash::Masked; my @unwanted = qw/ schema log /; my %hash = ( schema=>1, log=>2, aa=>3 ); tie my %masked, 'Tie::Subset::Hash::Masked', \%hash, \@unwanted; print Dumper(\%masked); __END__ $VAR1 = { 'aa' => 3 };