In article 
<[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Chuck Tomasi) wrote:

> I find myself writing this sort of thing a lot:
> 
> print STDERR "program.pl: subname(): debug statement\n";
> 
> I know $0 can be used for programname.pl (except it returns the full path to
> the program), is there some cool variable to get my hands on the name of the
> current sub?
> 
> --Chuck

perldoc -f caller

the croak and confess portions of the Carp module are also useful. 

perldoc Carp

-- 
Scott R. Godin            | e-mail : [EMAIL PROTECTED]
Laughing Dragon Services  |    web : http://www.webdragon.net/
It is not necessary to cc: me via e-mail unless you mean to speak off-group.
I read these via nntp.perl.org, so as to get the stuff OUT of my mailbox. :-)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to