# Check for error that first input file can't be found my $f1missing = 0; $f1missing = $t->waitfor(String => 'That file is unavailable', errmode => 'return'); if ($f1missing == 1) { print "\nFirst input file $prevcomp is missing!!\n"; $t->print(); # Send Enter for prompt $t->print(); # Send Enter to exit COMPARE $CTYPE = 0; # Set Compare type back to 0 to avoid running COMPARE report again $ETYPE = 1; # Set error type to 1 return; # Exit subroutine }