On Tue, Dec 2, 2008 at 09:23, Chas. Owens <[EMAIL PROTECTED]> wrote: > On Tue, Dec 2, 2008 at 09:11, Deviloper <[EMAIL PROTECTED]> wrote: >> Hi! >> >> Is there a special variable or trick to get the name of the current scope or >> subroutine name? >> >> Thanks, >> B. >> > > The caller* function will tell you information about the call stack > (including the current function): snip
Sometimes I answer without questions with giving a lot of thought to what may be the driving cause for the question. What do you want to know the function name for? debugging? (a real debugger is better than print statements), an error message? (that is what die or croak is for), a warning message? (that is what warn is for), logging? (this is the only thing I can think of off the top of my head that would be a valid use), or something else? -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/