in reply to Re^3: How to determine the path to the Perl binary that executed your program?
in thread How to determine the path to the Perl binary that executed your program?
I'm probably misunderstanding you, but even if perl is invoked without explicit path info and is found through the path environment variable, $^X is still correctly set:
C:\test>perl -le" print $^X" C:\Perl\bin\perl.exe C:\test>..\perl\bin\perl -le" print $^X" C:\Perl\bin\perl.exe
The only way I know of getting a different value for the path in $^X is if it is invoked via a subst (or NET USE) drive:
C:\test>subst p: c:\perl\bin C:\test>p:perl -le" print $^X" P:\perl.exe
Even then, so long as the subst remains in force, $^X remains valid for all normal uses.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to determine the path to the Perl binary that executed your program?
by demerphq (Chancellor) on Sep 29, 2006 at 09:46 UTC |