in reply to modifying the key of hash of arrays
"I am trying:$b="blah"; $hasharr{$rephead}=$b; #but i think i am accessing the array rather than the key.
Yes, you are writing "blah" into the value of the hash key/value pair, overwriting the anonymous array you had stored there.
Here is what you need to do:
$hasharr{$newkey} = $hasharr{$rephead}; delete $hasharr{$rephead};
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: modifying the key of hash of arrays
by hardburn (Abbot) on Oct 16, 2003 at 13:41 UTC |