#!/usr/bin/perl -w use strict; print "foo bar\n"; # Goes to screen open (STDOUT, ">/my_log"); # Don't have write permission to / print "foo bar\n"; # Goes to screen since it is preserved