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); }
In reply to Re: Passing hashes by reference
by Roger
in thread Passing hashes by reference
by wolis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |