in reply to Re: deferencing an hash in a subroutine
in thread deferencing an hash in a subroutine

and if I try to forse at the end of my sub:
$_[0]=\%q;

It will overwrite the previous hash reference. is it correct?

Replies are listed 'Best First'.
Re^3: deferencing an hash in a subroutine
by moritz (Cardinal) on Aug 20, 2010 at 15:19 UTC
    $_[0]=\%q; sets the first argument on the caller side to \%q. Which only makes sense if you pass a scalar variable as first argument.

    Maybe it would be more helpful if you wrote what the underlying reason is for doing what you try to do. Maybe that way we can suggest a better solution. See also XY Problem.

    Perl 6 - links to (nearly) everything that is Perl 6.
      ok, there is an update on my first post.
      thank you.