in reply to Process id in Net::Telnet

perldoc perlipc says:
Sending a signal to a negative process ID means that you send the signal to the entire Unix process-group.
This code sends a hang-up signal to all processes in the current process group (and sets $SIG{HUP} to IGNORE so it doesn't kill itself):
{ local $SIG{HUP} = 'IGNORE'; kill HUP => -$$; # snazzy writing of: kill('HUP', -$$) }
Use this hint as a pointer. I haven't done much IPC stuff lately.
I am assuming that your script does not fork of other non-telnet processes that should not be killed.