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?? |
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)
In Section
Seekers of Perl Wisdom
|
|