system("start asp.exe > asp.txt") and die "'start asp.exe' failed ($?): $!\n"; # or system('start '.$ENV{COMSPEC}.' /c "asp.exe > asp.txt"') and die "'start cmd asp.exe' failed ($?): $!\n";