use strict; use warnings; #### open(FILE,'run_tool -f "test.tcl" 2>&1; echo Status code: $?|'); #### exit 1 if ($_ =~ /^Status code: [^0]/)