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

0

Originally posted as a Categorized Question.

  • Comment on How do I determine the name of the calling script?

Replies are listed 'Best First'.
Re: How do I determine the name of the calling script?
by Anonymous Monk on Jun 28, 2000 at 18:17 UTC
    package Test; sub test { (caller)[1]; }; package main; print Test::test();

    Originally posted as a Categorized Answer.

Re: How do I determine the name of the calling script?
by redmist (Deacon) on Jun 29, 2000 at 03:28 UTC
    $0 is the program name according to Programming Perl. It "contains the name of the file containing the Perl script being executed."

    redmist

    Originally posted as a Categorized Answer.