[oak perl] running scripts in a DOS window

Kester Allen kester at gmail.com
Fri Jan 14 08:50:09 PST 2005


Hi Sandy--

I've used two ways to do this in the past (I'm assuming you want to
have the DOS window hang around so you can see program output or error
messages, so I'm gearing the following towards that):

The first is pretty close to the <STDIN> technique you didn't like: 
put a line like "while (1) {;}" as the very last line of your script--
this'll cause the script to loope forever at the end of the script,
and the DOS window will hang around until you hit control-C to kill
the script.  You could also use "sleep <large number>;" to keep the
window around for a <large number> of seconds.

Another way is to give up and just run the script from a separate DOS
window in the first place, which is usually what I ended up doing :)

--Kester

On Fri, 14 Jan 2005 11:42:07 -0500, Sandy Santra <santranyc at yahoo.com> wrote:
>  Before I completely give up on this, I thought I'd ask the group: is there
> any way to run perl scripts from a Windows Explorer window and not have the
> window close immediately after the script runs?  I've googled it and the
> posts advise to put the <STDIN> command at the end of every script, which I
> don't want to do.  My Perl File Type has the action "c:\perl\bin\perl.exe
> "%1" %*.  I'm running Perl Indigo 5.6.1.  Thanks.
>  
>  --Sandy Santra


More information about the Oakland mailing list