smgfc has asked for the wisdom of the Perl Monks concerning the following question:
%hash = ( "j" = "jack", "q" = "queen", "k" = "king", "a" = "ace" ); one( \%hash); sub one { my ($hash) = @_; if ( <STDIN> eq "hello\n" ) { two( \%$hash); # should this be two( $hash ); ? } } sub two { my ($hash) = @_; foreach ( keys %$hash ) { print "$_\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multiple passes by reference
by dws (Chancellor) on Feb 17, 2002 at 04:38 UTC | |
|
Re: multiple passes by reference
by dvergin (Monsignor) on Feb 17, 2002 at 04:35 UTC | |
|
Re: multiple passes by reference
by mojotoad (Monsignor) on Feb 17, 2002 at 05:37 UTC |