in reply to searching characters

Something like the following untested code:
sub lineOK { my $line = shift; foreach my $code (@ebase) { return 0 if eval "\$line =~ tr/$code/$code/" >= $limit; } return 1; }