home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!unipalm!ian
- From: ian@unipalm.co.uk (Ian Phillipps)
- Subject: Re: How to run a Perl under DOS?
- Message-ID: <1993Jan7.182209.1931@unipalm.co.uk>
- Organization: Unipalm Ltd., 216 Cambridge Science Park, Cambridge CB4 4WA, UK
- References: <1993Jan6.211929.169@kocrsv01.delcoelect.com>
- Date: Thu, 7 Jan 1993 18:22:09 GMT
- Lines: 28
-
- c23mts@kocrsv01.delcoelect.com (Mike Scheidler) writes:
-
-
- >Could someone shed some light on how to execute a script using one of
- >the DOS ports of perl?
-
- >I've seen an example somewhere which wraps the invocation of PERL.EXE into
- >a .BAT file (using %0 through %9 to pass any parameters), but it doesn't
- >seem to exit cleanly for me when using DOS 5.0.
-
- I've recently moved over to this idiom:
-
- @rem = '
- some dos batch commands
- PERL -S %0.BAT %1 %2 %3 (etc)
- GOTO ENDOFPERL
- ';
- # your perl script here
- __END__
- :ENDOFPERL
- some more DOS if you need it
- rem Drop through end of Batch file
-
- Ian
- --
- Ian Phillipps, Unipalm Ltd, 216 Science Park, Phone +44 223 420002
- Milton Road, Cambridge, CB4 4WA, England. Phax +44 223 426868
- PIPEX is a division of Unipalm Ltd. - phone 0223 424616.
-