in reply to Re^2: The Anomalous each()
in thread The Anomalous each()
For small hashes (for some definition of small which may depend on free memory), it can indeed be incredibly helpful: you can run the each iterator inside itself – i.e., two loops that absolutely must run inside each other.
But you can do that just as well with two nested foreach( keys %hash ) loops. There is nothing you can do with your function that cannot be done more straightforwardly with direct use of keys. each is necessary only when memory is a concern; your solution does not provide for that.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: The Anomalous each()
by Tanktalus (Canon) on Nov 19, 2005 at 15:49 UTC | |
by Aristotle (Chancellor) on Nov 19, 2005 at 16:13 UTC |