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


in reply to New switches for perl(1)

You've hardcoded your path to your perl binary in the script. Maybe that's OK, because it's hardwired in the shebang line as well... but personally, I would still prefer use of the special variable $^X, anyway. In your case, it also will contain the value '/usr/bin/perl'. But it will make less problems for maintenance, for people whose perl is in another location.
exec { $^X } $^X, @arg;

Replies are listed 'Best First'.
Re^2: New switches for perl(1)
by Aristotle (Chancellor) on Apr 22, 2003 at 14:05 UTC
    I briefly thought about this actually. Didn't know about $^X though - I guess I should crack the cover on perlvar again sometime. :) Thanks for the suggestion, accepted.

    Makeshifts last the longest.