perl: what is the variable holding the executing script file name



Hi Folks, Another novice PERL scripter here again. Today's question(s):
What is the PERL variable (constant?) which holds the filename of the
currently executing script? And is there one variable that holds only the
filename, and another one that holds the filename including the full path?

So, for example, if I am in /cgi/perlscripts: perl myfile.pl

What variable would return '/cgi/perlscripts/myfile.pl'?
And what variable would return only 'myfile.pl'?

Thanks as always!
Eben Yong
eben_yong@xxxxxxxx

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

.



Relevant Pages

  • Re: perl: what is the variable holding the executing script file name
    ... > What is the PERL variable which holds the filename ... > of the currently executing script? ... Executable Name: perl ... * To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: perl: what is the variable holding the executing script file name
    ... $0 holds the program that's executing. ... Another novice PERL scripter here again. ... > filename, and another one that holds the filename including the full path? ... * To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: writing get_script()
    ... the Grave Hand of nick_keighley_nospam@xxxxxxxxxxx Did ... my $filename = 'text43.txt'; ... which puts perl in paragraph mode. ...
    (comp.lang.c)
  • Re: "system" with [ ] in filename
    ... Do the have a special meaning to Perl in this context? ... Or should I look for the problem in the way Windows handles the ... Its mostly looking in the current dir (where the script ... half-baked attempt to create a new version of the same filename - ...
    (comp.lang.perl.misc)
  • malformated substitution attempt
    ... Perl, v5.8.3 Linux ... # It does not displace the X with the filename. ... print $string. ... I do find simple substitution aplenty ...
    (comp.lang.perl.misc)