but I am not sure if $^X is identical to $Config{perlpath} or not.
Why not? perlvar has a couple of pages explaining what $^X means, the dangers of relying on $^X...
Config is the docs you want :) osname, perlpath
Basically, $^X is the name of the actual exe, wherever it lives, whatever it has been renamed to (notperl.exe)
except on VMS. perlvar warns about $^X not containing .exe suffix on VMS ... easier to document than fix VMS bugs I guess (weak sauce)
I use $^X all the time, I've never seen VMS :)
| [reply] |
I am using Perl on VMS quite regularly (perhaps an average 4 or 5 days per month. I would guess it has to do with the fact that you usually don't call exe files directly by their name on VMS, but almost always through a symbol (something similar to an environment variable) pointing to the exe file. Quite probably, $^X knows the symbol name, but not the exe file behind. I'll try to test this when I get to work.
Update: Actually, I just tried, on our VMS platforms, with Perl version 5.8.6, $^X contains the full name, including physical path, exe extension and even the version number:
ROL>sh symbol perl
PERL == "$PERL_ROOT:[000000]PERL.EXE"
ROL>sh logical PERL_ROOT
"PERL_ROOT" = "$1$DGA3501:[SYS0.SYSCOMMON.PERL5_8_6.]" (LNM$JOB_834
+94F40)
ROL>perl -e "print $^X, qq(\n)"
$1$dga3501:[sys0.syscommon.perl5_8_6.][000000]perl.exe;1
| [reply] [d/l] [select] |
| [reply] |