home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / perl / 7712 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  2.2 KB

  1. Path: sparky!uunet!psinntp!alsys1!yu1.yu.edu!manaster
  2. From: manaster@yu1.yu.edu (Chaim Manaster)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: How to run a Perl under DOS?
  5. Summary: Please explain the batch file.
  6. Message-ID: <1268@alsys1.aecom.yu.edu>
  7. Date: 7 Jan 93 23:18:38 GMT
  8. References: <1993Jan6.211929.169@kocrsv01.delcoelect.com> <1993Jan7.182209.1931@unipalm.co.uk>
  9. Sender: news@alsys1.aecom.yu.edu
  10. Organization: School of Engineering and Applied Sciences, UCLA
  11. Lines: 48
  12. Nntp-Posting-Host: yu1.yu.edu
  13.  
  14. In article <1993Jan7.182209.1931@unipalm.co.uk> ian@unipalm.co.uk (Ian Phillipps) writes:
  15. >c23mts@kocrsv01.delcoelect.com (Mike Scheidler) writes:
  16. >
  17. >
  18. >>Could someone shed some light on how to execute a script using one of
  19. >>the DOS ports of perl?
  20. >
  21. >>I've seen an example somewhere which wraps the invocation of PERL.EXE into
  22. >>a .BAT file (using %0 through %9 to pass any parameters), but it doesn't
  23. >>seem to exit cleanly for me when using DOS 5.0.
  24. >
  25. >I've recently moved over to this idiom:
  26. >
  27. >    @rem = '
  28. >    some dos batch commands
  29. >    PERL -S %0.BAT %1 %2 %3 (etc)
  30. >    GOTO ENDOFPERL
  31. >    ';
  32. >    # your perl script here
  33. >    __END__
  34. >    :ENDOFPERL
  35. >    some more DOS if you need it
  36. >    rem Drop through end of Batch file
  37. >
  38. I am fairly new to all of this and don't quite understand how this
  39. DOS batch (that apparently contains aPerl script) works or how it
  40. passes the parameters from the command line to the Perl script.
  41. How is the switch from DOS batch processing to Perl script
  42. processing accomplished and why does the DOS batch proccessor skip
  43. over al of the Perl script line? I am sure that its obvious to most
  44. of you out there, but I sure don't have the finer points down quite
  45. yet. If you could run down the above batch file with line by line
  46. explanations, I would surely appreciate it, and hopefully
  47. understand it too.
  48.  
  49. Thanks for the help.
  50.  
  51. Henry Manaster
  52.  
  53. -- 
  54. ***************************************************************************
  55.     Henry Manaster          *     EMail: manaster@yu1.yu.edu
  56.     Brooklyn, NY            *
  57.                                 *
  58.     Disclaimer: The above is not necessarily MY opinion nor that 
  59.                 of anyone else :-)  ????!
  60. ****************************************************************************
  61.  
  62.