$#f stands for the last index of the array @f.  So 2..$#f means "from index
2 to the last index".  This means that the code is skipping $f[0] and $f[1].

-----Original Message-----
From: Mike Singleton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 9:04 AM
To: [EMAIL PROTECTED]
Subject: help with commenting code..



# grep each line for the declared variables
while (<IN>) {
         print "parsing $_";
         if ( /$JOBSTART|$TASKSUM|$TASKDET|$TASKEND|$ERROR|$JOBEND/i )
         {

# remove spaces and replace with commas
                 my @f = split /\s+/,$_,9;
                 
                  print OUT join (',', @f[2..$#f]) ;
---> What does this line (above) do?  I know it removes the first two
fields?

         } else {
                 print "skipped: '$_'\n";
         }
}

===
Mike Singleton 
Network Analyst
(253) 272-1916  x1259
(253) 405-1968 (cellular)
[EMAIL PROTECTED]

DaVita Inc.
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to