Jonathan Mast wrote:
Hi,

Hello,

I have a ~125MB file of which I want to read lines n thru n+x and write
those into a separate file.  What is the best way to go about this?

while ( <FILE> ) {
    # read and ignore up to n
    last if $. == $n - 1;
    }

while ( <FILE> ) {
    print;
    last if $. == $n + $x;
    }



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to