if ($to_file == 0) { print "blah\n"; } else { print MYFILE "blah\n"; }