Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Patch 9 from outer space (was Re: Force script to use /bin/sh?) Message-ID: <7113@jpl-devvax.JPL.NASA.GOV> Date: 20 Feb 90 00:09:49 GMT References: <15178@bfmny0.UU.NET> <7105@jpl-devvax.JPL.NASA.GOV> <1990Feb18.190513.464@iwarp.intel.com> <15187@bfmny0.UU.NET> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 26 In article <15187@bfmny0.UU.NET> tneff@bfmny0.UU.NET (Tom Neff) writes: : Actually we could generalize this even further, like using it in vi(1), : if Perl respected the "-c" switch like SH and CSH. : : perl -c "myscript.pl arg1 arg2..." : : should behave just like : : perl myscript.pl arg1 arg2... Except that the -c argument to sh is a legal sh script, and the -c argument to csh is a legal csh script. So the -c argument to perl should be a legal perl script. And "myscript.pl arg1 arg2" isn't. perl -c "system 'myscript.pl arg1 arg2...';" would be legal perl. Of course, that might end up executing /bin/sh again. You might say that you want it to act as if it were a shell. But what if you say perl -c "myscript.pl arg1 arg2 | myotherscript.pl arg1 arg2" Should perl handle that? How much shell syntax do I put into perl? Larry