in reply to stop process based on exit status.

You have a bareword test.tcl in your code. Also, you open FILE but you then read from TEMP. You should always
use strict; use warnings;
I don't think you can get an exit status from a pipe. If you're on *n*x you could try
open(FILE,'run_tool -f "test.tcl" 2>&1; echo Status code: $?|');
and
exit 1 if ($_ =~ /^Status code: [^0]/)
I'm not sure how to do the equivalent in Windows.

Another option is to use -f (see man perlfunc) to test whether the file exists before you run the command.