in reply to Can I write a transparent shell wrapper to start the correct build of Perl?

What if you go the other way? At the top of your perl scripts put this:

#!/bin/sh eval '. /etc/host.conf; exec /nfs/perl/5.10/${HOST_PLATFORM}/bin/perl +-S $0 ${1+"$@"}' if 0;
Admittedly, it's not as pretty as having all that ugliness hidden away in a separate, single location, but other than that, it may actually work.

  • Comment on Re: Can I write a transparent shell wrapper to start the correct build of Perl?
  • Download Code

Replies are listed 'Best First'.
Re^2: Can I write a transparent shell wrapper to start the correct build of Perl?
by thparkth (Beadle) on Feb 05, 2008 at 16:41 UTC
    Thanks, yes, that's plan B. If there have to be crude shell gubbins going on I would ideally wish that they were invisible to the Perl programmer, if you know what I mean.