in reply to Re^2: for loops
in thread Count every 3rd base occurence

Ugh, had to read BrowserUk's approach twice to see what was going on. Mine isn't as simple as it started out either - raaa, so obvious in hindsight: my $count = grep /[GC]/, $dna =~ /..(.)/g; There. It slices, it dices, it counts DNA bases. (Or is that RNA? Anyway.)

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^3: for loops
by BrowserUk (Patriarch) on Dec 17, 2002 at 00:47 UTC

    Much better than mine, and any of the others to my way of thinking, Clean, neat and obvious (to read).

    Should have been obvious to write too, but it wasn't.


    Examine what is said, not who speaks.