in reply to how do i redirect STDOUT, STDIN, or STDERR to a FILE?

but i'm trying to do it based on a user determined option
i'm writing this to be a standalone .EXE that people who don't
use PERL can run this one script ... thanks to 'perl2exe' this is
possible
if someone enters
myscript.exe -f filename.txt
i'd like to send it to a file
but i'd also like to be able to ask them
print "what output filename do you want?";
$outfilehandle = <STDIN>;
============================================
i just spoke to a friend of mine and have found
open(STDOUT, ">>$LOGGINGFILE"); # redirect them to the log file

i havent tested it yet but it looks about right

Originally posted as a Categorized Answer.