Thank you Tanton, Felix;

----- Original Message ----- 
From: "Felix Geerinckx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 26, 2002 5:32 PM
Subject: Re: Read file from second line


> on Mon, 26 Aug 2002 15:15:06 GMT, [EMAIL PROTECTED] (Q) wrote:
> 
> > Apologies for such a 'lame' question but i read the FAQ on 
> > http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq5-full.html
> > 
> > How do i read on from the second line of a text file? 
> 
> You start reading from the first line but throw it away ;-)
> 
>     #! /usr/bin/perl -w
>     use strict;
> 
>     open IN, $0 or die "Cannot open myself: $!\n";
> 
>     <IN>; # Throw away first line
> 
>     # Process from second line onwards.
>     while (<IN>) {
>         print;
>     }
> 
>     close IN;
> 
> -- 
> felix
> 
> -- 
> 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