in reply to Dereferencing hashrefs

What's wrong with just using it as a hashref? The reason it is a hashref in the first place is to save memory. You can just write things like:
my $val = $hr->{val}; foreach my $key (keys %$hr) { # etc }
I just don't see the need for you to create a hash from a hashref.

gav^