Re: Read only part of file

2007-08-15 Thread Paul Lalli
On Aug 15, 11:38 am, [EMAIL PROTECTED] (Toddy Prawiraharjo) wrote: > Is it possible to read only part of file in perl? Yes. You can stop reading at any time. > At this moment I have script similar to: > > open (FH, "file"); > @FH = ; Well there's your problem.

Re: Read only part of file

2007-08-15 Thread yitzle
On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > In a message dated 2007-8-15 23:39:42 中国标准时间, [EMAIL PROTECTED] writes: > > open (FH, "file"); > @FH = ; > foreach $line(@FH){ > processing linebyline > } > close FH; > > However, I only need certain part of file only to be read (let sa

Re: Read only part of file

2007-08-15 Thread JeffHua
In a message dated 2007-8-15 23:39:42 中国标准时间, [EMAIL PROTECTED] writes: open (FH, “file"); @FH = ; foreach $line(@FH){ processing linebyline } close FH; However, I only need certain part of file only to be read (let say beginning 20 lines). Yes perl's builtin variable '$.' stores the lin

Read only part of file

2007-08-15 Thread Toddy Prawiraharjo
HI all, Is it possible to read only part of file in perl? At this moment I have script similar to: open (FH, “file"); @FH = ; foreach $line(@FH){ processing linebyline } close FH; However, I only need certain part of file only to be read (let say beginning 20 lines). Above method