in reply to regex of hash key on the fly
Tie::Hash::Regex provides that interface you want, but internally loops over all the keys. That's inevitable if you use a regex. If your concern is efficiency, Tie::Hash::Regex is not going to help.
If I correctly understand what you are trying to do, you could actually store your data in a format that's more useful to you, eliminating the need for regexs entirely.
$hash{$serial}{''} = ...; $hash{$serial}{O} = ...; $hash{$serial}{R} = ...;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex of hash key on the fly
by martzpet (Initiate) on Nov 13, 2007 at 21:43 UTC |