You could also call $Win->Hide() before calling thread->join(), which would give the appearance** that the program had ended.
-----Original Message----- From: Jeremy White [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 22, 2006 12:21 PM To: [EMAIL PROTECTED]; Plum, Jason; perl-win32-gui-users@lists.sourceforge.net Subject: Re: [perl-win32-gui-users] threads error >Hmm, strange, I already tried that. Now I've done it again and I see >that it works. >However, If I put a sleep(10) in the subroutine which runs in a >separate thread, the program is not closed for 10 seconds. > >Is there a way to force closing the program immediately even if it >should wait for a certain operation (like sleep()? Yeah, don't join on the thread:) The warning that Perl gives "x threads were running" is just a warning and depending what you are doing it's ok to ignore it. Cheers, jez.