{ local *TEMP = *STDOUT; undef(*STDOUT); tie *STDOUT, 'FileHandle::A', *TEMP; } print "testing"; #### { my $temp = *STDOUT; undef(*STDOUT); tie *STDOUT, 'FileHandle::A', $temp; } print "testing";