in reply to Removing key/value pairs from a hash

Not tested but try this.

my %norefs = map { $_ => $h{ $_ } } grep { ! ref $h{ $_ } } keys %h;

I hope this works for you.

Cheers,

JohnGG