in reply to Stopping the Program
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.
|
|---|