sub stmt { my $buf = shift; if (matched_stmt($buf)) { return 1; } elsif (unmatched_stmt($buf)) { return 1; } return 0; } # etc.