Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: in_array and skipping foreach

by VSarkiss (Monsignor)
on Apr 13, 2005 at 10:34 UTC ( [id://447417]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: in_array and skipping foreach
in thread in_array and skipping foreach

There's no specific function for finding a value in an array.
Eh? What about grep? Seems like it would do just what the OP wanted.

Replies are listed 'Best First'.
Re^3: in_array and skipping foreach
by RazorbladeBidet (Friar) on Apr 13, 2005 at 10:36 UTC
    Ah yes, I spoke to soon. Shouldn't write answers when distracted ;)
    --------------
    "But what of all those sweet words you spoke in private?"
    "Oh that's just what we call pillow talk, baby, that's all."
Re^3: in_array and skipping foreach
by jbrugger (Parson) on Apr 13, 2005 at 10:43 UTC
    Isn't it faster to create a lookuptable next to your array? The value in the array will be the key in the lookup table (hash) with the value 0 or 1.

    "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447417]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.