Fellow Monks,
When I run the below portion of my script and the script cannot open the named directory it should run the Tk command under "unless" and then execute the exit command and leave the program. However, when I run, it leaves the program without running the Tk commands. I do not get any errors or warnings when executing the script. I am using warnings and diagnotics. Can anyone spot an error?
my $ep = 0;
my $TEST = qx (read_apt _test_setup);
chop $TEST;
my $PATH = "/opt/adacs/test/$TEST/.saved_poins";
my $success = open RF, $PATH;
unless ($success) {
$ep = 1;
my $fail = MainWindow->new();
$fail->geometry("250x150");
$fail->Label(-text => "File Failed To Open!")-> grid(
$fail->Button(-text => "Acknowledge",
- command => sub { exit}));
}
exit if $ep == 1;
Thanks,
Lhamo_rin