http://www.perlmonks.org?node_id=496006


in reply to Re: path to perl interpreter
in thread path to perl interpreter

What you say does not agree to the docs and to my practice.

$ cat whichperl.pl #!/usr/bin/perl printf "operating system: %s\n executable: %s\n", $^O, $^X, ;

And see the results:

$ perl whichperl.pl operating system: linux executable: /usr/bin/perl $ chmod +x whichperl.pl $ ./whichperl.pl operating system: linux executable: /usr/bin/perl

And later, to another OS:

$ perl whichperl.pl operating system: freebsd executable: /usr/local/bin/perl