in reply to How to print STDOUT to a file

You have to use a file handle.

open (FOUT, "filename") || die("you cant open"); print FOUT $str;

or another way is to use >filename.txt in the command prompt to redirect the output from printing STDOUT, provided if your are using windows os.

Prasad

Replies are listed 'Best First'.
Re^2: How to print STDOUT to a file
by Anonymous Monk on Nov 14, 2005 at 11:46 UTC
    Sorry but both solutions dont work, or I misunderstood you. Writing to a file would just result in printing the status of system(). Using system(prog, options, > file) results in a failure telling me that i dont use prog rigth an listing the options available. What did i wrong? I am working on Windows.

      Could you show us the exact system command you are using so that we can identify the mistake exactly.

      Prasad

        system($rnapath, "-p", "-noCloseGU", "-noLP", "$_") == 0 or die $?;
        $rnapath being the program called. Thank you for your patience.