in reply to undef/re-set an array of hash references ?
I created what I think is an array of hash references like this: push @{$infilestore{$id}}, (split //, $seq);
What you've got is a hash of array references. Each key ($id) in %infilestore points to a value which is a reference to an array. Thus, in your code above you are dereferencing the array and appending the values you get from splitting $seq
To clear the hash, you can say undef(%infilestore) or %infilestore = (), or foreach over the keys using delete to clear that entry (not recommended if you just want to get rid of everything though <update>for reasons of efficiency</update>).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: unde/re-set an array of hash references ?
by Anonymous Monk on Dec 10, 2002 at 11:00 UTC |