in reply to Get Result Of Exe File Into Another file

As idle has said, if all you want is your output to go to a file, you can use redirection, or perhaps pipe to the 'tee' command. But you can work with the output of a program if you open the program in Perl using a pipe.

# # note - untested code. # my $filename = "myfile.txt"; open TEXT, "-|", "program textfile" || die("Cannot start program\n"); open OUT, ">", "$filename" || die("Cannot open output file.\n"); while(<TEXT>) { chomp; print OUT "Simon Says \"", $_, "\"\n"; } close(TEXT); close(OUT);