Re: Get the byte position of previous line from last line in file

2007-11-06 Thread Gunnar Hjalmarsson
sivasakthi wrote: I have the text file as following, this first line this is the second line this the third line this is the fourth line this is the sixth line this is the seventh line while opening and reading that text file, is it possible to get the byte position of "this is the sixth line"

Re: Get the byte position of previous line from last line in file

2007-11-05 Thread Jeff Pang
-Original Message- >From: sivasakthi <[EMAIL PROTECTED]> > > >while opening and reading that text file, is it possible to get the byte >position of "this is the sixth line" ?? > Yes. see perldoc -f tell -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Get the byte position of previous line from last line in file

2007-11-05 Thread sivasakthi
Hi All, I have the text file as following, this first line this is the second line this the third line this is the fourth line this is the sixth line this is the seventh line while opening and reading that text file, is it possible to get the byte position of "this is the sixth line" ?? Tha

Re: peek next line in file

2007-09-27 Thread Xavier Noria
On Sep 27, 2007, at 1:29 AM, Mahurshi Akilla wrote: Is there a way in perl to peek the next line in the file while keeping the line pointer the same? I want to do something like this: while () { //do some stuff //?? peek next line ?? and enter conditional block// //do some more

peek next line in file

2007-09-27 Thread Mahurshi Akilla
Is there a way in perl to peek the next line in the file while keeping the line pointer the same? I want to do something like this: while () { //do some stuff //?? peek next line ?? and enter conditional block// //do some more stuff } Of course, there are workarounds, but it would

Re: Line in file

2001-12-11 Thread walter valenti
> > To: [EMAIL PROTECTED] > > Subject: Line in file > > > > > > Hi, > > I there a way to tell the number of the line in a file? > > > > while (){ > > print "I am reading line "; > > } > > > > Anway to tell without

RE: Line in file

2001-12-11 Thread Kipp, James
there is a special var $. that hold the current record number > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 11, 2001 9:30 AM > To: [EMAIL PROTECTED] > Subject: Line in file > > > Hi, > I there a way to tel

Line in file

2001-12-11 Thread Patrick.Griffin
Hi, I there a way to tell the number of the line in a file? while (){ print "I am reading line "; } Anway to tell without using some counting code? Thanks... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]