Hi Jon and Jose,
Jose Alves de Castro wrote on 27.05.2004:
>On Thu, 2004-05-27 at 10:10, Jon Herbry wrote:
>>Hi, anybody have idea find the number in a file? Assume I create a
>>file call
>"sample"
>>and have content below: Hi,
>>Jame where are you? How old a
On Thu, 2004-05-27 at 10:10, Jon Herbry wrote:
> Hi, anybody have idea find the number in a file? Assume I create a file call "sample"
> and have content below:
>
> Hi, Jame where are you?
> How old are you?
> when you free?
> can you coming my home?
> -
> -Original Message-
> >there a variable containing the actual
> > source-line number during execution?
> >
>
> Yes, the $.
This is incorrect, $. actually contains the 'current line number' from
the last accessed file handle. It will be undef if no filehandles have
been accessed.
The _
> -Original Message-
> From: Paul Johnson [mailto:[EMAIL PROTECTED] On Behalf Of Paul Johnson
> Sent: Friday, May 07, 2004 1:20 PM
> To: NYIMI Jose (BMB)
> Cc: Gabor Urban; [EMAIL PROTECTED]
> Subject: Re: Line number variable
>
>
> On Fri, May 07, 2004
On Fri, May 07, 2004 at 01:01:01PM +0200, NYIMI Jose (BMB) wrote:
> > -Original Message-
> > From: Gabor Urban [mailto:[EMAIL PROTECTED]
> >
> > I was going through the manuals some times, but could not
> > find it. Is there a variable containing the actual
> > source-line number durin
> -Original Message-
> From: Gabor Urban [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 07, 2004 12:57 PM
> To: [EMAIL PROTECTED]
> Subject: Line number variable
>
>
> Hi,
>
> I was going through the manuals some times, but could not
> find it. Is there a variable containing the act
]
Sent: Tuesday, April 23, 2002 10:29 AM
To: 'Jonathan E. Paton'
Cc: Beginners (E-mail)
Subject: RE: Line number of whence called
I am atheist so I don't believe in the Religion Module.
8^P
PS you're right... should have used Carp.
> -Original Message-
> From: J
I am atheist so I don't believe in the Religion Module.
8^P
PS you're right... should have used Carp.
> -Original Message-
> From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 1:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Lin
> Is there someway to get the line number of
> whence a subroutine was called?
Yes, but 9/10 ten people use Carp.pm, the
other 1 respondant was an assembly language
programmer.
perldoc Carp
Carp is implemented using 'caller', which
you can find documentation about at:
perldoc -f caller
If you
On Fri, Sep 07, 2001 at 02:58:30PM +0200, Roland Schoenbaechler wrote:
> In some cases I want to write the line-number of the script to STDERR (In
> analogy to the functions die or next). Does a variable exist indicating the
> line number of the currently executed step (or the last step)?
If you
Hi Ronald,
On Fri, Sep 07, 2001 at 02:58:30PM +0200, Roland Schoenbaechler
([EMAIL PROTECTED]) spew-ed forth:
> analogy to the functions die or next). Does a variable exist indicating the
> line number of the currently executed step (or the last step)?
>
Yes, you can use the __LINE__ token:
.
On Sep 7, Roland Schoenbaechler said:
>In some cases I want to write the line-number of the script to STDERR (In
>analogy to the functions die or next). Does a variable exist indicating the
>line number of the currently executed step (or the last step)?
The caller() function also gives you this
print "I stopped at line number ",__LINE__,"\n";
On Fri, Sep 07, 2001 at 02:58:30PM +0200, Roland Schoenbaechler shaped the electrons
to read:
> In some cases I want to write the line-number of the script to STDERR (In
> analogy to the functions die or next). Does a variable exist indicating the
At 02:58 PM 9/7/01 +0200, you wrote:
>In some cases I want to write the line-number of the script to STDERR (In
>analogy to the functions die or next). Does a variable exist indicating the
>line number of the currently executed step (or the last step)?
The current line is __LINE__. It's in the fi
14 matches
Mail list logo