home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / perl / 7705 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.2 KB  |  39 lines

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