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

Re: Is 'last' redundant?

by strfry() (Monk)
on Apr 07, 2003 at 13:59 UTC ( [id://248597]=note: print w/replies, xml ) Need Help??


in reply to Is 'last' redundant in this code?

looking at your code, it appears that it would stop looking for "key" after it's found it the first. if you only intend on reporting the first instance of "key" in an array, and you think there's a chance in hell that there will ever be another instance of "key" in your array, then no, it's not redundant. (:

this is asssuming, of course, that you intend to use this code on something more complex, that may contain more than one instance of whatever you're searching for.

strfry(reality)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found