Perl question

This is a discussion on Perl question within the Tech Board forums, part of the Community Boards category; How to you redirect stdout to a file? I want to do something like:
Code:
open(OUTPUT, ">outfile.txt");
setstdout(OUTPUT);
print "hello ...