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} = ...;
In reply to Re: regex of hash key on the fly
by ikegami
in thread regex of hash key on the fly
by martzpet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |