in reply to search for a sequence of chars in a string
Update: But if your DNA sequence is really huge, loading it all into memory is probably very inefficient. You could use something like tachyon's approach given above, although it will probably miss matches that straddle a \n.## not this ## $n = ($string =~ tr/$search//); $n = () = $string =~ m/$search/g;
blokhead
|
|---|