I am a bioinformatics student at the federal university of rio de janeiro - Brazil. I have your book on Perl/TK and Im a perl lover. In one of my projects, I constructed a GUI with perl/tk, and this gui contains a shut-down button that gracefully ends the aplication and sends a signal to the server. Unfortunately, some people press the X button for closing the application located in the upper right hand corner (Windows XP). When this happens, the aplication is closed without sending the signal to the server. How can I over ride this function to gracefully end my soft even if the user closes it with the X button. I have alreadu tried to capture some signals with the %SIG, but it doesnt work.