--- Birgit Kellner <[EMAIL PROTECTED]> wrote:
> --On Freitag, 24. August 2001 09:54 -0700 "Randal L. Schwartz"
> <[EMAIL PROTECTED]> wrote:
> > That's too much there...
> >
> > /add_\w+/ and print("Yippie!\n"), last while $_ = each %hash;
> >
> > "scalar each" is underutilized. :)
> >
> I'm impressed, thanks a lot!
>
> Further question: Someone mentioned a module that allows for regexps as
> hash keys. Could you please repost that, I inadvertently deleted the
> message ...
Birgit,
There two options that immediately spring to mind:
http://theoryx5.uwinnipeg.ca/CPAN/data/Tie-Hash-Regex/Regex.html
http://theoryx5.uwinnipeg.ca/CPAN/data/Tie-RegexpHash/RegexpHash.html
I don't know much about those modules other than having heard others recommend them.
They both
allow you to use regular expressions as hash keys.
Cheers,
Curtis Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]