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'}; ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Function hash by reference.
by kevyt (Scribe) on Jan 07, 2007 at 23:14 UTC |