note
ichimunki
Main problem is that you never call MainLoop().
<br><br>
The following code does what you seem to want without the need for the $ep variable (and I didn't include the $TEST stuff because it's not relevant to the problem that I can see):
<code>
use Tk;
my $PATH = "/opt/adacs/test/$TEST/.saved_poins";
open( RF, $PATH ) or do_err_window() && exit;
print "This got executed\n";
sub do_err_window
{
my $fail = MainWindow->new();
$fail->geometry("250x150");
$fail->Label(-text => "File Failed To Open!")->
grid(
$fail->Button(-text => "Acknowledge",
- command => sub { exit}
)
);
MainLoop();
}
</code>
270587
270587