I am sure someone else can do it better, but how about the following?

foreach (@rray){
  if (/match/) {print "yay";}
}

On 10/10/06, Charles Farinella <[EMAIL PROTECTED]> wrote:
How can I iterate through an array and if I find a match do something
without doing that thing for every element in the array.  I've been
trying to do it with foreach, but that isn't working.

--
------------------------------------------------------------------------
Charles Farinella
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
[EMAIL PROTECTED]
voice: 603.924.6079   fax: 603.924.8668


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to