Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl Script full path

Status
Not open for further replies.

timtrust123

Programmer
Dec 19, 2003
19
GB
Hi
I am trying to get the full path of where the perl script is being run.
For example, I am running a script called test.pl from the folder
C:\Program Files\Perl_test\

By printing $0 in the script the folloing is displayed
c:\Program~1\Perl_t~1\test.pl

Any ideas on how i can get the full path displayed and not the 8.3 version ?

All help & suggestions appreciated.
 
When I tested that, I got the long path returned. I'm using ActivePerl 5.8.
 
I can't see how it makes much of a difference tbh, however $0 should return the full path, it worked for me on windows XP if I remember. I'm on linux at the moment so I can't test it... sorry about that...

Tell me why you need the full path and I will see what I can do to help in context :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top