in reply to How to use dynamic execution path instead of absolut.
On Unix system the following should work:
The backticks execute the found perl.
The -x switch forces perl to skip everything before #!perl
$0 is the scriptname.
$* are all commandline parameters.
which finds (hopefully) your perl.#!/bin/sh `which perl` -x $0 $* exit #!perl print "hello perl\n";
The backticks execute the found perl.
The -x switch forces perl to skip everything before #!perl
$0 is the scriptname.
$* are all commandline parameters.
In Section
Seekers of Perl Wisdom