Re: perl: what is the variable holding the executing script file name
- From: Dave Oksner <dave-3000-l@xxxxxxxx>
- Date: Mon, 30 Jan 2006 09:10:10 -0800
$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 *
.
- References:
- Prev by Date: Re: OT:The Century Ahead
- Next by Date: Re: OT:The Century Ahead
- Previous by thread: perl: what is the variable holding the executing script file name
- Next by thread: Re: perl: what is the variable holding the executing script file name
- Index(es):
Relevant Pages
|