in reply to Re: searching characters
in thread searching characters

tr/// doesn't interpolate. You could use m// or s/// instead.
return 0 if ( () = $line =~ /\Q$base/g ) >= $limit;
return 0 if ( $line =~ s/\Q$base//g ) >= $limit;