my $pid = fork(); if ( $pid == 0 ) { # child process so do stuff here # usually have an exit to ensure child # does not escape this if clause exit; } else { # parent process, waits a while sleep 60 # kills child kill 9, $pid; } # parent continues on here (as will child if not killed or exited)