thanks for your explanation andal. the current code doesn't get the child pid, thats one of the things i was trying to figure out how to do using system(). Most of the examples i've seen use fork+exec then kill the forked process. That doesn't work in my situation because it exec doesn't return to the program, unless theres an error according to perldocs.