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.
In reply to Re^3: Using substr on Hash Keys
by ikegami
in thread Using substr on Hash Keys
by pc0019
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |