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
In reply to Re: How to print STDOUT to a file
by prasadbabu
in thread How to print STDOUT to a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |