in reply to Function hash by reference.

This my $location_hash = get_location(\*ZIPS);

and this my $cat_hash = get_categories (\*SICS); are already a hash references, so you don't need to use backslashes

here catch_error(\*LOGS, \$page, $location_hash, $cat_hash );.

Then, you just name the references inside the sub and use them in exactly the same way as you have in the code outside the sub.

sub catch_error{ my ($fh, $str, $location_hash, $cat_hash ) = @_; ... delete $location_hash->{'the key'}; ... }

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Function hash by reference.
by kevyt (Scribe) on Jan 07, 2007 at 23:14 UTC
    Thank you very much!