Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: GUI issue

by moritz (Cardinal)
on Oct 18, 2011 at 12:24 UTC ( #932122=note: print w/ replies, xml ) Need Help??

in reply to GUI issue

You don't need a loop to do a hash lookup.

if (exists $f_switch_val{'man'}) { ... }

Is faster, less code and harder to screw up.

Update: reading the code twice, it appears you are searching for a value, not for a key. If that's the case, the proper solution is to construct the hash the other way round, so that the common lookup is by key, not by value.

Comment on Re: GUI issue
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-11-28 15:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls