in reply to Re^3: Perl/Tk and exit(0)
in thread Perl/Tk and exit(0)

Thanks for the reply, but I could use some clarification if you could. Are you saying I should replace

$svBtn = $mw->Button( -text => "SAVE", -command => sub {&checkDays; exit(0);});

with

$svBtn = $mw->Button( -text => "SAVE", -command => sub {&checkDays; $mw->after(5000, sub {exit(0)});}

When I do that I get an error saying "Scalar found where operator expected" at the next line, near "$mw" I guess I am sort of lost.

Replies are listed 'Best First'.
Re^5: Perl/Tk and exit(0)
by tybalt89 (Monsignor) on Apr 03, 2020 at 06:37 UTC

    missing ); on replacement statement;

      Thanks so much! I feel kind of foolish for missing something so simple--I should have turned on "highlight matching brackets" on my editor.

        I feel kind of foolish for missing something so simple...

        Been there, done that, got the scars to prove it. :)


        Give a man a fish:  <%-{-{-{-<

        one possibility to find these, is sending your script through perltidy and looking at the output.