On Tue, 04 Nov 2003 20:41:17 -0800, Paul Harwood wrote:
> I would like to enumerate a list and search through each element like
> so:
> [...]

Why do you want to enumerate the list?  Do you _really_ need to know the
index of the current element?  If really so:

  my $i = 0;
  foreach ( @list ) {
      $i++;
      if ( /match/ ) {
          # ...
      }
  }

> If (/$logs[i]/)

Please post _real_ Perl code.  The code above has no meaning and won't
even compile.


-- 
Tore Aursand <[EMAIL PROTECTED]>


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

Reply via email to