Re: Pattern matching problem

2004-02-26 Thread Henry Todd
On 2004-02-26 00:43:21 +, [EMAIL PROTECTED] (Wolf Blaum) said: As I understand Biology, there is 4 nucleotid acids which gives 4**2 combinaions for dupplets. So you need 8 vars to count the occourence of all douplets. Worse for triplets. (24) As I understand genetics, triplets are what matte

Re: Pattern matching problem

2004-02-25 Thread Henry Todd
Hi all - Many thanks to those who shared their knowledge. I had a feeling that there would be an elegant solution to my problem, but I was having no luck figuring it out. For reference, where before my code was: $Pcc++ while $sequence =~ /cc/gi; ..it is now: $Pcc++ while $sequence =~ /c(?=c)

Re: Pattern matching problem

2004-02-25 Thread Henry Todd
On 2004-02-25 17:42:46 +, [EMAIL PROTECTED] (Kenton Brede) said: If you don't get an answer to your question this is probably why - http://learn.perl.org/beginners-faq#2.2%20%20what%20is%20this%20list%20_not_%20for Kent Kent Kent Kent - Thanks for the pointer. I should have read the list

Pattern matching problem

2004-02-25 Thread Henry Todd
I'm having trouble counting the number of specific substrings within a string. I'm working on a bioinformatics coursework at the moment, so my string looks like this: $sequence = "caggaactttcggaagaccatgta"; I want to count the number of occurrences of each pair of letters, for example: Num