doob has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks. I am a n00b and I have stumbled upon a very perplexing question. I was hoping that with your ultimate powers of programming, you could help me. Here it goes:
I have this loop:
while ( $_[0]->seq() =~ m/CG/g ) {++$CG;}It goes on to infinity.
$_[0]->seq() : returns a big string -- a dna sequence
And the rest you probably know what it does. So why can't it just work. A being that is higher than me( my so-called teacher) has suggested it's an "order of operations" problem.
Hope it helps.
How can I solve it without writing other lines of code???
Yours truly,
=d(o_o)b=
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Infinity loop
by Tanktalus (Canon) on Nov 20, 2005 at 16:31 UTC | |
by doob (Pilgrim) on Nov 20, 2005 at 16:36 UTC | |
by nobull (Friar) on Nov 20, 2005 at 17:59 UTC | |
by thospel (Hermit) on Nov 20, 2005 at 22:03 UTC |