Paul Harwood wrote:
> I would like to enumerate a list and search through each element like
> so: 
> 
> 
> 
> If (/$logs[i]/)
> 
> 
> 
>  { # code}
> 
> 
> 
> 
> 
> I know the syntax is wrong so I was hoping someone could
> explain how to
> do this.

If I understand correctly, you want to use grep():

   for (grep /pattern/, @list) {
      ... do something with $_ ...
   }

perldoc -f grep

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to