in reply to "array" search
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) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "array" search
by Sheol (Novice) on Jan 14, 2006 at 08:21 UTC | |
by ikegami (Patriarch) on Jan 14, 2006 at 09:16 UTC |