It turns out that

(caller 0)[3]

got me pretty close to what I was looking for.

Thanks.

> -----Original Message-----
> From: Bob Showalter [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 11:06 AM
> To: 'Tomasi, Chuck'; '[EMAIL PROTECTED]'
> Subject: RE: Name of current sub?
> 
> 
> > -----Original Message-----
> > From: Tomasi, Chuck [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, November 21, 2001 12:02 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Name of current sub?
> > 
> > 
> > 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?
> 
> perldoc -f caller
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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

Reply via email to