Once you have a reference, it stays a reference until you dereference it. This is a bit clearer if you use a more accurate name for the function arguments.
Here's trimmed down version of your example, with names changed:
one(\%hash); sub one { my($hashref) = @_; two($hashref); } sub two { my($hashref) = @_; # it's still a hashref foreach ( keys %$hashref ) { print "$_\n"; } }
In reply to Re: multiple passes by reference
by dws
in thread multiple passes by reference
by smgfc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |