Lhamo_rin has asked for the wisdom of the Perl Monks concerning the following question:
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?
Thanks, Lhamo_rinmy $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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Tk failure
by ichimunki (Priest) on Jul 01, 2003 at 18:58 UTC | |
Re: Tk failure
by Mr. Muskrat (Canon) on Jul 01, 2003 at 18:56 UTC | |
Re: Tk failure
by bbfu (Curate) on Jul 02, 2003 at 18:36 UTC |
Back to
Seekers of Perl Wisdom