actually for one, on a linux box, it would be
kill -9 $pid
that is assuming you are calling the system's kill function and not a sub.
kill 9 $pid will attempt to literally kill pid 9 and not kill $pid with a signal of 9
Update: as I find by doing the research,
perlfunc:kill and
perlman:perlipc show that my suggestion sucked, using kill with -9 actually works contrary to the shell command, and kills the process group.
hmmm, now I know there's a
kill() function.