the value of $^X may be a relative or absolute pathname of the perl program file, or may be the string used to invoke perl but not the pathname of the perl program file.
In that case, wheel out the heavy artillery.
use Config; my $perl = $Config{perlpath}; $perl .= $Config{_exe} if $^O ne 'VMS' and $perl !~ /$Config{_exe}$/i; print "executable is $perl\n";
(Completely off-topic: This is my 1000th post!)
• another intruder with the mooring in the heart of the Perl
In reply to Re^5: path to perl interpreter (use Config)
by grinder
in thread path to perl interpreter
by rkillera
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |