in reply to Re: Passing hash reference to a subroutine
in thread Passing hash reference to a subroutine

First of all, thank you for taking the time to respond. What looked 'funny' to me was the $ { $myref } {$key}. I think I need to take some time to review the 'Programming Perl' book. Specifically Chapter 2 on subroutines and Chapter 4 on References and Nested Data Structures.
Regards, Terry Kummell
  • Comment on Re^2: Passing hash reference to a subroutine

Replies are listed 'Best First'.
Re^3: Passing hash reference to a subroutine
by hbm (Hermit) on Feb 20, 2009 at 15:48 UTC

    You could dereference that without the braces: $$myref{$key}.

    Also, map is good for your printing:

    print map { "$_=$$myref{$_}\n" } sort keys %$myref;