in reply to setting the exit code for Perl/Tk Apps?

Been a little while since I've had to do anything in Tk, but IIRC, you need to call exit after $mw->destroy.