Help for this page
my $file = "output.txt"; open (FOO, "> $file") or die "Cannot write '$file': $!"; ... # If you are going to do a bunch more stuff. close (FOO); # prints here are back to normal.
perl yourscript and args > outputfile