in reply to Re^2: Using substr on Hash Keys
in thread Using substr on Hash Keys
I was going to do something like this, but I couldn't reason out which of the delete vs the substr would happen first.
Doesn't matter, unless you expect a collision between a new key and an old key. If that's the case, other solutions have the problem too. (The solution is to use another hash.)
What does matter is that all the keys are fetched before any insertion into and deletion from the hash. And they are. for loads the entire list over which to iterate into memory before starting to loop.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using substr on Hash Keys
by jettero (Monsignor) on Sep 11, 2008 at 01:45 UTC |