Hi,

There is a %SIG hash with several signal handlers in it. you can
overwrite the signal handler for C-c and write your own stuff there.

usually you should just set a variable to true. eg. $abort = 1; your
programm should poll the var. (for example in the main loop, if there's
something like that )

HTH

On Thu, 14 Jun 2007 11:54:40 +0100 (BST)
anand kumar <[EMAIL PROTECTED]> wrote:

> Hi all,
>   I would like to know if there is any possibilty to handle a situation where 
> in while executing a perl script if i press a Control-C (or terminate the 
> execution explicitly) then my code should be in a position to handle it and 
> display a predefined message(or specifically execute predefined code for 
> cleanup) and then actually exit the code execution.
>   
> Thanks in advance for the help.
>   regards
> Anand
> 
>                               
> ---------------------------------
>  Here’s a new way to find what you're looking for - Yahoo! Answers 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to