$pid = open(PID,"$cmd &|") or die $!; # further on you can read back the output of the command with ... while ( ) { echo "PID output: $_\n"; }