Take a look at signal handlers and the kill function.
In reply to Re: kill command in perl? by pbeckingham in thread kill command in perl? by EchoAngel