Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Press enter to exit

by zork42 (Monk)
on Jul 28, 2013 at 05:50 UTC ( [id://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; }
Output:
Illegal division by zero at D:\stuart\play\temp\pp.pl line 6. Hit enter when done:

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found