On 6/26/07, michaelzhao <[EMAIL PROTECTED]> wrote:
I need to be able to specify an arbitrary start and stop position to start tallying the occurences of the bases and also to find the frequencies of the bases in that particularly defined area.
If your data is in the form of a string, it's simple to use the substr() function to operate on just part of that string. Is that what you need? my $data = 'GATTACA' x 5; my $start = 5; my $end = 25; my $length = $end - $start; my $g_count = substr($data, $start, $length) =~ tr/G//;; print "There were $g_count Gs in that range.\n" Good luck with it! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/