Someone is trying to convince me of the usefulness of a Win32 module that can "pause" or keep the DOS window open when a perl script is double-clicked. Normally, under Windows, when a script is double-clicked the DOS window will open and close quickly, so that anything sent to STDOUT or STDERR will not be seen (or simply flash across the screen too quickly). So this person has created a module that detects (using env variables) if the script was double-clicked and then keeps the window open until the user presses a key.
So bascially, you are looking at something like this:
print "hello\n";
print "monk\n";
pause();
My problem with this module is as follows:
- If someone wants to see any output they should execute the script at the command-line.
- There are much better ways of keeping the window open, such as this.
- You could also use sleep or send the output to another application, if it is that important.
Anyway, I just wanted to get more opinions about such a module.
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.