Perl script window closing immediately after running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ommz
    New Member
    • Jul 2012
    • 5

    Perl script window closing immediately after running

    Why do perl console windows close immediately after the script finishes to run even if there was some output to show? I want my scripts to pause and show the results and oonly close after the user clicks the close button.
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    I would say, at the end of your Perl script put the following:

    Code:
    print "Press ENTER to exit:";
    <STDIN>;
    That should pause the window and wait for the enter key to be pressed.

    Regards,

    Jeff

    Comment

    Working...