in reply to Passing hashes by reference
Your code my %h_ref = %{+shift}; created a local copy of the hash.sub loader{ # loads values into hash.. my $tail = shift; my $h_ref = shift; print 'In sub:'.Dumper($h_ref); $h_ref->{'one'}='thing_'.$tail; $h_ref->{'two'}='thong_'.$tail; print 'After add:'.Dumper($h_ref); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing hashes by reference
by wolis (Scribe) on Dec 02, 2003 at 04:35 UTC | |
by Roger (Parson) on Dec 02, 2003 at 04:50 UTC | |
by jweed (Chaplain) on Dec 02, 2003 at 04:48 UTC | |
by exussum0 (Vicar) on Dec 02, 2003 at 12:37 UTC |