in reply to dos window

tye wrote -Mouse to deal with that. But, how do you "display the error message" ? If you use die "error message", your program terminates and the lines waiting for user acknowledgement won't be executed.

You could put the "wait for input" stuff into an END{} block...