open ( OUTFILE, '>myfilename.txt' ); print "This goes to the screen\n"; select ( OUTFILE ); print "This goes to the file\n";