Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Avoiding Hardcoded path of Perl.exe in coding

by Corion (Patriarch)
on Jan 06, 2010 at 20:13 UTC ( [id://815975]=note: print w/replies, xml ) Need Help??


in reply to Avoiding Hardcoded path of Perl.exe in coding

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/;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://815975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-24 19:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found