open FH, "> somefilename" or die $!; print FH <## open STDOUT, "> thefilepath" or die $!;