home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!nevada.edu!jimi!dawkins.cs.unlv.edu!grover
- From: grover@dawkins.cs.unlv.edu (Kevin Grover)
- Subject: Re: How to run a Perl under DOS?
- Message-ID: <1993Jan7.194156.4618@unlv.edu>
- Sender: news@unlv.edu (News User)
- Reply-To: grover@isri.unlv.edu
- Organization: Information Science Research Institute (UNLV-ISRI)
- References: <1993Jan6.211929.169@kocrsv01.delcoelect.com> <1993Jan7.182209.1931@unipalm.co.uk>
- Date: Thu, 7 Jan 93 19:41:56 GMT
- Lines: 28
-
- In article <1993Jan7.182209.1931@unipalm.co.uk>, ian@unipalm.co.uk (Ian Phillipps) writes:
- )
- ) 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
- )
-
- They best i've found to call PERL, is from 4DOS. Add this line to
- your autoexec.bat file:
- set .PL=C:\BIN\PERL.EXE (or where ever your exe lives)
-
- Then, any file ending in .PL is automatically a executable perl
- script. The benefit of this is that redirection on the command line
- works (it's pretty flaky w/ batch files).
-
- --------------------------------------------------------------------------
- Kevin O. Grover | UNLV Computer Science and Electrical Engineering
- grover@isri.unlv.edu | ISRI - Information Science Research Institute
- CServe: [73627,1677] | 4505 S. Maryland Parkway, Las Vegas NV 89154-1017
-