Each field is an element in the @fields_nospace array; the first field (File Name) is at $fields_nospace[0], and the fifth field (Errors) is at $fields_nospace[4]. So you can check if $fields_nospace[4] > 0, or if $fields_nospace[2] != $fields_nospace[3], and do things based on those conditions. Hope this helps.