#!/usr/bin/perl use strict; use test; print "Start of print.\n"; open( STDERR, ">", "/tmp/error.txt" ) or die "Error: Cannot open file - $!"; test->Check_File(); close( STDERR ); print "End of print.\n";