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



$0 (dollar zero) holds the program that's executing. On my linux system, it
showed the behavior you wanted. I don't know if there's any reason it
wouldn't work on MPE, if that's even where you are trying to run it.

Dave

On Mon, Jan 30, 2006 at 10:46:50AM -0500, Eben Yong wrote:
> 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 *

--
+-----------------David Oksner-----http://www.case.net/-----------------+
|Real computer scientists don't comment their code. The identifiers are|
|so long they can't afford the disk space. |
+-----------------------------dave@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+

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

.



Relevant Pages

  • perl: what is the variable holding the executing script file name
    ... Another novice PERL scripter here again. ... What is the PERL variable which holds the filename of the ... * To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: How to edit the SYSSTARTUP.PUB.SYS file?
    ... SYSSTART.PUB.SYS - this does nothing to prevent udc's from executing. ... log on as system manager with command to avoid executing log on udc's ... To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • current file name
    ... I am executing a method in vb.net dll say 'xyz.dll" ... I want to use the filename 'xyz.dll' in side the method. ... Prev by Date: ...
    (comp.lang.basic.visual.misc)
  • current file
    ... I am executing a method in vb.net dll say 'xyz.dll" ... I want to use the filename 'xyz.dll' in side the method. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: current file
    ... Sorry for the incomplete post. ... I am executing a method in vb.net dll say 'xyz.dll" ... I want to use the filename 'xyz.dll' in side the method. ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)