You're not really doing anything to create a cmd.exe console and keep it alive.
C:\sisyphusion>type script.pl
use warnings;
print "Hello World\n";
C:\sisyphusion>type try.bat
@echo off
set PATH=C:\MinGW\perl516\bin;C:\MinGW\bin;%PATH%
@echo on
cmd /k perl script.pl
C:\sisyphusion>
When I double click on 'try.bat' I get a cmd.exe console pop up that contains:
C:\sisyphusion>cmd /k perl script.pl
Hello World
C:\sisyphusion>
I think you should be able to make use of that approach, too.
It's the "
/k" switch that keeps the cmd.exe console alive. If you use "
/c" instead, then the cmd.exe console closes as soon as the perl script has finished executing.
(The "
@echo off" and "
@echo on" merely conceal the output of the "
set PATH" command - you probably already know that.)
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.