Try:
Code:
if (m/Test Errors: 0/g) {
echo "No errors";
}
Or, if the number of spaces is variable, you can use something like
Code:
if (m/Test Errors:\s+0/g) {
echo "No errors found"
}
Or, for something a bit more complex, if you wanted it to match for any number of errors and pull the number into a variable...
Code:
if (m/Test Errors:\s+(\d+)/g) {
echo $1." Errors found.\n"
if ($1 == 0) {
echo "All is well\n"
}
}