in reply to Removing key/value pairs from a hash

Another way:

my @keepers = grep !ref($h{$_}), keys %h; my %norefs; @norefs{@keepers} = @h{@keepers};
A word spoken in Mind will reach its own level, in the objective world, by its own weight