Style nitpick: you can use `unless` and remove the extra parentheses here for extra clarity, i.e..,

    unless ( scalar \@errors )