Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: The fastest way of searching a certain element in an array

by blakem (Monsignor)
on Apr 14, 2004 at 23:49 UTC ( [id://345252]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    % perldoc List::Util
    
    ...
                   $foo = first { defined($_) } @list    # first defined v
    +alue in @list
                   $foo = first { $_ > $value } @list    # first value in 
    +@list which
                                                         # is greater than
    + $value
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 06:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found