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

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!nevada.edu!jimi!dawkins.cs.unlv.edu!grover
  3. From: grover@dawkins.cs.unlv.edu (Kevin Grover)
  4. Subject: Re: How to run a Perl under DOS?
  5. Message-ID: <1993Jan7.194156.4618@unlv.edu>
  6. Sender: news@unlv.edu (News User)
  7. Reply-To: grover@isri.unlv.edu
  8. Organization: Information Science Research Institute (UNLV-ISRI)
  9. References: <1993Jan6.211929.169@kocrsv01.delcoelect.com> <1993Jan7.182209.1931@unipalm.co.uk>
  10. Date: Thu, 7 Jan 93 19:41:56 GMT
  11. Lines: 28
  12.  
  13. In article <1993Jan7.182209.1931@unipalm.co.uk>, ian@unipalm.co.uk (Ian Phillipps) writes:
  14. ) I've recently moved over to this idiom:
  15. )     @rem = '
  16. )     some dos batch commands
  17. )     PERL -S %0.BAT %1 %2 %3 (etc)
  18. )     GOTO ENDOFPERL
  19. )     ';
  20. )     # your perl script here
  21. )     __END__
  22. )     :ENDOFPERL
  23. )     some more DOS if you need it
  24. )     rem Drop through end of Batch file
  25.  
  26. They best i've found to call PERL, is from 4DOS.  Add this line to
  27. your autoexec.bat file:
  28.     set .PL=C:\BIN\PERL.EXE        (or where ever your exe lives)
  29.  
  30. Then, any file ending in .PL is automatically a executable perl
  31. script.  The benefit of this is that redirection on the command line
  32. works (it's pretty flaky w/ batch files).
  33.  
  34. --------------------------------------------------------------------------
  35.  Kevin O. Grover      | UNLV Computer Science and Electrical Engineering
  36.  grover@isri.unlv.edu | ISRI - Information Science Research Institute
  37.  CServe: [73627,1677] | 4505 S. Maryland Parkway, Las Vegas NV 89154-1017
  38.