if ($pid = fork) { #upload and download } else { print "error forking: $!\n"; }