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"
-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
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
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
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
> > 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
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
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]