use Acme::Spork; my $req_id = spork( sub { system("perl mycode.pl -email \"$uemail\" -type $sometype -unit $someunit"); } ) or die qq {Could not fork for spork: $!};