Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: hash key regular expression pattern

by dada (Chaplain)
on Nov 07, 2002 at 09:53 UTC ( [id://211030]=note: print w/replies, xml ) Need Help??


in reply to hash key regular expression pattern

use Tie::RegexpHash from CPAN!

there's also Tie::Hash::Regex by our fellow davorg, but I can't see the difference between the two :-)

cheers,
Aldo

King of Laziness, Wizard of Impatience, Lord of Hubris

Replies are listed 'Best First'.
Re: Re: hash key regular expression pattern
by davorg (Chancellor) on Nov 14, 2002 at 13:01 UTC

    There is a difference, but it's a bit subtle.

    With Tie::RegexpHash you set your hash keys to regular expressions and then look them up using fixed strings.

    With Tie::Hash::Regex you set the keys to fixed strings and then look them up using regular expressions.

    In this case, it looks like Tie::RegexpHash is the way to go.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 05:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found