{ local *TEMP; open(TEMP, ">&STDOUT") or die("Unable to dup STDOUT: $!\n"); undef(*STDOUT); tie *STDOUT, 'FileHandle::A', *TEMP; } print "testing";