Hi,

Is there a better way to search all elements of an array for a string 
(without using a loop to test individual elements) than:

$line = join(' ',@myarray);
if ($line =~ /my string/) {
        some code
}

I've seen map and grep used by some but also critisized by some.  I thought 
there might be a function to easily search all elements of an array at once 
for a string but I can't find one.

Cheers
Darren

-- 
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