in reply to It's friday, I can't think.

The magic is in select:
open (FILE, ">$filename") or die "Can't open: $!"; select(FILE); print "This will go in $filename.\n"; select(STDOUT); print "This will go where you expect it -- STDOUT!\n";