G'day nquiton,
Welcome to the monastery.
The answer to that will depend on how you're actually running your program. Possibilities include:
> perl prog_name > prog_name > perl -e "... perl code ..."
Also, does: (a) a new window appear, display some program output (possibly too quickly to read), then disappear; or (b) the window containing the initial command prompt disappear as soon as the program finishes?
A possible workaround would be to add this line to your code after processing is completed but before the program exits:
print "Hit enter when done: "; <>;
I don't have an MSWin machine to demonstrate that on, but it should look something like this:
$ perl -Mstrict -Mwarnings -E ' say "Your program runs and displays output here ..."; print "Hit enter when done: "; <>; ' Your program runs and displays output here ... Hit enter when done:
When I hit Enter, it returns to the command prompt; in your case, I presume the window would now disappear. The point is, it gives you a chance to actually read the output (or, indeed, do whatever you want with it: paste into a text file, take a screenshot, etc.).
There may be configuration options to alter the behaviour you're seeing: unfortunately, I can't help with that, but maybe another monk can.
-- Ken
In reply to Re: Newbie cmd prompt problem
by kcott
in thread Newbie cmd prompt problem
by nquiton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |