I agree with Aristotle. You should probably use one of the existing Tie:: modules if what you're after is an ordered hash. If you decide not to do this, than the first solution he posted is much easier to read than what you had. He only forgot to replace
if ($key =~ m!^$id$!) {
with the much more efficient
if ($key eq $id) {
In reply to Re: "array" search
by ikegami
in thread "array" search
by Sheol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |