Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UU.NET (Tom Neff) Newsgroups: comp.lang.perl Subject: Force script to use /bin/sh? Message-ID: <15178@bfmny0.UU.NET> Date: 16 Feb 90 16:04:35 GMT Reply-To: tneff@bfmny0.UU.NET (Tom Neff) Lines: 22 OK all you Perl gurus and hackers out there. I need a trick statement that does the REVERSE of the 'nih' front end: eval "exec /usr/bin/perl -S $0 $*" if $running_under_some_shell; This forces Perl, sh and Csh to feed the script to Perl. I need something to force Perl, sh and Csh to feed the script to sh! I have thought about it some, but it's hard to think of a syntax that fools sh and Perl like the above. ------------------------------------------------------------------------ I might add in passing that Perl ought to respect the #! notation itself, and pass scripts to the chosen interpreter (if it doesn't end in 'perl'). *** THIS WOULD MAKE A NICE THING TO ADD IN PATCH 9 LARRY *** hee hee ------------------------------------------------------------------------