Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The script is running in a while loop. I want to 'catch' window close(upper right cross) signal and perform some clean up before termination. Is that possible in perl?
I heard of END blocks. but that gets executed always regardless of success/failure and I want clean up to be executed only on failure cases like window close,CTRL C/Z,kill signal etc.
I also checked another thread using package 'tk' which is handy for GUI programming,but did not got this case of capturing the window close signal and doing cleanup.
Any help/thoughts are highly appreciated. Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catching WINDOW close event and take actions
by zentara (Cardinal) on Sep 15, 2011 at 18:56 UTC | |
by Anonymous Monk on Sep 15, 2011 at 21:31 UTC | |
by Anonymous Monk on Sep 21, 2011 at 23:53 UTC | |
by zentara (Cardinal) on Sep 22, 2011 at 09:23 UTC | |
by Anonymous Monk on Sep 22, 2011 at 10:05 UTC | |
|
Re: Catching WINDOW close event and take actions
by onelesd (Pilgrim) on Sep 15, 2011 at 18:29 UTC | |
by Anonymous Monk on Sep 15, 2011 at 21:32 UTC |