in reply to Perl/Tk and exit(0)
Especially if the program is about to exit anyway, you can insert another call to the event-loop handler so that the event queue is run through one more time. The drawing never happens because the event is queued but never processed.