Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Default Hash Key

by Anonymous Monk
on May 07, 2008 at 02:09 UTC ( [id://685117]=note: print w/replies, xml ) Need Help??


in reply to Default Hash Key

In this case I would simply opt for “keep it simple.” Write a nice short sub that produces the effect that you want ... and move along. There is no problem with doing an “if exists” test for a particular value followed by an apparent-lookup of that same value, because you can be quite sure that on that “second lookup” that value will be found most-immediately.

So, just go for an implementation that is reasonably clear, and trust the Gods of Perl to have done the rest on your behalf. (They're quite good at that sort of thing...)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2025-01-25 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (70 votes). Check out past polls.