Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Best of both worlds? Message-ID: <10019@jpl-devvax.JPL.NASA.GOV> Date: 18 Oct 90 22:30:23 GMT References: <8b7GHJu00Vp6M3kosR@andrew.cmu.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 15 In article <8b7GHJu00Vp6M3kosR@andrew.cmu.edu> rm55+@andrew.cmu.edu (Rudolph T. Maceyko) writes: : Is it possible to make the same PERL script work on two machines that : keep PERL in different places without having to manually include perl : before each command execution? Yes, but you have to use the following hack, or something similar #!/bin/sh -- # perl eval 'exec perl -S $0 ${1+"$@"}' if 0; Note that the exec depends on your PATH. The comment on the first line tells perl not to start up /bin/sh, which would be counterproductive. Larry