Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!uunet!stanford.edu!msi.umn.edu!cs.umn.edu!cybrspc!roy From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail) Newsgroups: comp.lang.perl Subject: Re: Perl script in Msdos batch file Message-ID: Date: 5 May 91 08:37:03 GMT References: <1740@targon.UUCP> Organization: Villa CyberSpace, Minneapolis, MN Lines: 21 andre@targon.UUCP (andre) writes: > Now that we have perl also running on msdos, I thought up a way to put > perl script inside msdos batch files in the same way we do in sh scripts. > > My question is, do you see problems with this solution? > Has it been done earlier? > Can it be done better or more elegant? (this works on msdos 3.3 > script must be in your path, not just .) Elegance, you say? Certainly, you can do it more elegantly... just use 4dos for your command interpreter, and do 'set .pl=c:\path\to\perl'. Now, any filename ending in .pl will be submitted to perl. (the usual rejoinder about the natural superiority of 4dos over command.com has been deleted, since this isn't a DOS-specific group :-) -- Roy M. Silvernail -- roy%cybrspc@cs.umn.edu - OR- cybrspc!roy@cs.umn.edu perl -e '$x = 1/20; print "Just my \$$x! (adjusted for inflation)\n"' [space reserved for clever quote]{mail your submissions}