First, you are confusing "command prompt" (of which there is none involved here) and "console". There's a number of ways you could prevent the console from closing when the script terminates.
You could create a shortcut to your script and configuring the shortcut not to close the console on exit.
You could launch your script from another console application (e.g. the shell) that will continue to run after the Perl script exits.
You could create a shortcut to another console application that will run your script and continue to run after the Perl script exits. (e.g. cmd /k "perl script.pl" or cmd /c "perl script.pl & pause")
You could create an association to your script's extension that will run another console application that will run your script and continue to run after the Perl script exits. (e.g. cmd /k "perl script.pl" or cmd /c "perl script.pl & pause")
You could forgo exiting your script until the user wants to. (e.g. By using END { print "Press enter to exit\n"; <STDIN>; })
In reply to Re: Clicking on exe the command prompt should stay
by ikegami
in thread Clicking on exe the command prompt should stay
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |