$_ = 'baa baa black sheep'; my $length = 3; print tr/a// >= $length ? 'OK' : 'NOK'; [download]
In reply to Re: Counting matches. by poolpi in thread Counting matches. by b4swine