return 0 if ( () = $line =~ /\Q$base/g ) >= $limit;