in reply to stupid/simple mistake

As i stand, i see the following, your code counts up to 1 match per line, so(I guess) that's why you are getting 1 instead of 3.

As for counting the bases between the matches... I'd save the match positions, and the subtrac them to get the actual distances ;)

Also, this node(Re: Exact string matching) might help to solve the 1 match per line problem, but it'll take longer =/

Replies are listed 'Best First'.
Re^2: stupid/simple mistake
by gogoglou (Beadle) on Oct 18, 2011 at 13:26 UTC

    thanks everyone for the replies. I am really not very experienced in perl, since I do not use it so much.

    As for counting the bases between the matches... I'd save the match positions, and the subtrac them to get the actual distances ;)

    I can use index to do that, but then I need to add +3 in the first one, and then I want to store them in an array, so in the end I can calculate the avg distance, by dividing the sum of the distances, by the count. any suggestions, how to do that?

    Thanks everyone