home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psinntp!alsys1!yu1.yu.edu!manaster
- From: manaster@yu1.yu.edu (Chaim Manaster)
- Newsgroups: comp.lang.perl
- Subject: Re: How to run a Perl under DOS?
- Summary: Please explain the batch file.
- Message-ID: <1268@alsys1.aecom.yu.edu>
- Date: 7 Jan 93 23:18:38 GMT
- References: <1993Jan6.211929.169@kocrsv01.delcoelect.com> <1993Jan7.182209.1931@unipalm.co.uk>
- Sender: news@alsys1.aecom.yu.edu
- Organization: School of Engineering and Applied Sciences, UCLA
- Lines: 48
- Nntp-Posting-Host: yu1.yu.edu
-
- In article <1993Jan7.182209.1931@unipalm.co.uk> ian@unipalm.co.uk (Ian Phillipps) writes:
- >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
- >
- I am fairly new to all of this and don't quite understand how this
- DOS batch (that apparently contains aPerl script) works or how it
- passes the parameters from the command line to the Perl script.
- How is the switch from DOS batch processing to Perl script
- processing accomplished and why does the DOS batch proccessor skip
- over al of the Perl script line? I am sure that its obvious to most
- of you out there, but I sure don't have the finer points down quite
- yet. If you could run down the above batch file with line by line
- explanations, I would surely appreciate it, and hopefully
- understand it too.
-
- Thanks for the help.
-
- Henry Manaster
-
- --
- ***************************************************************************
- Henry Manaster * EMail: manaster@yu1.yu.edu
- Brooklyn, NY *
- *
- Disclaimer: The above is not necessarily MY opinion nor that
- of anyone else :-) ????!
- ****************************************************************************
-
-