Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!mcsun!tuvie!iiasa!wnp From: wnp@iiasa.AT (Wolf PAUL) Newsgroups: comp.lang.perl Subject: Re: Perl script in Msdos batch file Message-ID: <1045@iiasa.UUCP> Date: 8 May 91 07:03:59 GMT Article-I.D.: iiasa.1045 References: <1740@targon.UUCP> Organization: IIASA, Laxenburg/Vienna, Austria, Europe Lines: 29 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. ) What I use is a "header" and a "trailer" to wrap the perl script in: ) ) My question is, do you see problems with this solution? Other than a lot of typing, no :-) ) Has it been done earlier? I believe I have seen something like this earlier ... ) Can it be done better or more elegant? (this works on msdos 3.3 ) script must be in your path, not just .) Well, the most elegant way no doubt is to get 4DOS, a shareware replacement for COMMAND.COM selling for less than US$ 50 (registered version). It will let you say "set .pl=c:\bin\perl.exe", and will then automatically hand files with the extension ".pl" to c:\bin\perl to execute. That, in fact, is one feature I highly recommend to MS and DR for addition to their MS-DOS 5.x and DR-DOS products. -- W.N.Paul, Int. Institute f. Applied Systems Analysis, A-2361 Laxenburg--Austria PHONE: +43-2236-71521-465 INTERNET: wnp@iiasa.iiasa.ac.at FAX: +43-2236-71313 UUCP: uunet!iiasa!wnp HOME: +43-2236-618514 BITNET: tuvie!iiasa!wnp@aearn.BITNET