in reply to Doing a system command and getting the pid

untested:
my $pid = open( my $fh, 'your_command 1>/tmp/xxx 2>&1 |' );
Boris