And in your program:sub check_errors { return unless ($ERRORCHECK == 1); my $st = system("ask-yes-no", "There were errors. Do you want to con +tinue?") >> 8; if ($st != 0) { # exit the program } }
...do stuff... check_errors(); ...do more stuff... check_errors(); ... etc.
Update: See this article: CLI Magic: Creating basic front ends with dialog and Xdialog for more info on this approach. You may not even have to write the dialog application.
In reply to Re: Stopping the Program
by pc88mxer
in thread Stopping the Program
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |