in reply to How to kill forked process

Try system (perldoc -f system) and see if it does what you need.