Just use $^X, which contains the currently running Perl executable. You'll need to properly quote it if you're interpolating it into a command line, if $^X contains whitespace:
my $perl = $^X; $perl = qq{"$perl"} if $perl =~ /\s/;
In reply to Re: Avoiding Hardcoded path of Perl.exe in coding
by Corion
in thread Avoiding Hardcoded path of Perl.exe in coding
by toastbread
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |