What's the error you get when you call exit directly?
In reply to Re: setting the exit code for Perl/Tk Apps? by kyle in thread setting the exit code for Perl/Tk Apps? by pip9ball