Maybe I'm reading this wrong, but if you're only looking for the third field
on the second line, why not just do this:

open(INFILE,"myfile.txt") || die "Could not open myfile.txt! $!";
<INFILE>; #skip the first line
$_ = <INFILE>;
my $thirdField = (split /,/,$_)[2]; #Get the third elementof
                                    #the array created by splitting


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:Charles.Belcher@;mercantile.net]
Sent: Thursday, October 31, 2002 9:22 AM
To: [EMAIL PROTECTED]
Subject: skip the first line



I have a file that looks like
0
232,32387,2323

I am only interested in the last set of digits on the second line.  My plan
was to split on coma and take the 3 element of the array. I am having
problems
skipping the fist line.  Any assistance would be appreciated.


Chuck Belcher

***********************************************************************
The opinion(s) expressed in this e-mail message are those of the sender 
alone and do not represent the position of Mercantile Bankshares 
Corporation or its Affiliates unless specifically so stated herein.

Additionally, the information contained in this message is intended 
only for the persons to whom it is addressed and may contain 
confidential or privileged material. Copying, distributing, 
dissemination, reliance on, or other use of the information by persons 
other than the intended recipient(s) is prohibited. If you received 
this message in error, please notify the sender and delete the entire 
message from any computer.
***********************************************************************



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

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

Reply via email to