SkipHuffman has asked for the wisdom of the Perl Monks concerning the following question:

This should be a really simple question. I have a function module that will be called by a number of scripts. part of the output of that function will include the name of the calling script. How do I get that name? I am sure it is somewhere terribly obvious.

Skip

Replies are listed 'Best First'.
Re: Get the name of the calling script in a module function
by polypompholyx (Chaplain) on Oct 05, 2005 at 13:50 UTC
    Or maybe $0?

      Yeah, that is what I needed. I don't claim to be a paticularly good programmer. I knew there was something like that but I just could not find it. Thanks,

      Skip
        Not knowing the names of Perl's cryptic $punctuation variables does not a bad programmer make. Better to know how and where to look on the (many) occassions you find you don't know something. perldoc, [id://Super Search], Google are usually good bets.
Re: Get the name of the calling script in a module function
by chester (Hermit) on Oct 05, 2005 at 13:47 UTC

      More than I need, but something to keep in mind for the future. Thanks!

      Skip