in reply to Skip 21 Lines

Ummm .... why not use seek? Something like:
open MY_FILE, $filename; seek MY_FILE, 21, 0; while (<MY_FILE) { ... do reading schtuff here ... }

That way, you go right to where you want to go. No silly while loops or anything like that.

Replies are listed 'Best First'.
Re: Re: Skip 21 Lines
by merlyn (Sage) on Apr 24, 2001 at 22:40 UTC
      whoops. I'm a dunce! That'll teach me to think I can see something easy that 4 monks before me didn't.