Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Press enter to exit

by zork42 (Monk)
on Jul 28, 2013 at 05:50 UTC ( #1046711=note: print w/ replies, xml ) Need Help??

in reply to Press enter to exit

A modification to kcott's case 1:

This will always prompt you to press enter, no matter how the script exits, even if an error is encountered.
This can be useful if the script is running in its own window which closes when the script exits.

use strict; use warnings; # ... my $x = 1 / 0; # ... END { print "\nHit enter when done: "; <>; exit; }
Illegal division by zero at D:\stuart\play\temp\ line 6. Hit enter when done:

Comment on Re: Press enter to exit
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046711]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2015-07-31 09:30 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (276 votes), past polls