Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: How to determine the path to the Perl binary that executed your program?

by rafl (Friar)
on Sep 28, 2006 at 19:43 UTC ( #575413=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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?

Actually, it doesn't.

$ perl -le'print $^X' /usr/bin/perl $ cp /usr/bin/perl ~/tmp/ $ ./tmp/perl -le'print $^X' /home/rafl/tmp/perl

Cheers, Flo

  • Comment on Re^3: How to determine the path to the Perl binary that executed your program?
  • Download Code

Replies are listed 'Best First'.
Re^4: How to determine the path to the Perl binary that executed your program?
by mreece (Friar) on Sep 28, 2006 at 19:48 UTC
    according to perldoc perlvar,
    Depending on the host operating system, 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.
    and indeed,
    osx% perl -le'print $^X' perl

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575413]
help
Chatterbox?
[stevieb]: for the first time ever, I will have 100% of the documentation and unit tests written for a new distribution before writing even a single character of the C or Perl code required :)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2017-01-20 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.