Re: Infinite loop problem

2005-09-13 Thread John Doe
Vineet Pande am Dienstag, 13. September 2005 13.00: > Dear Perl Guru: > > I want to write a script which takes input a text file with sequence of > alphabets (amino acids) like GAGAGAGAGGA etc. and converts them to a > three letter corresponding code [G= GLY, A= ALA]. The output should be then

[Fwd: Re: Infinite loop problem]

2005-09-13 Thread Suvajit Sengupta
Hi Vineet, Since Perl provides strong feature of pattern matching of Regular Expn you should use that. Just read in the pattern GAGAGAGAGGA from the file and store it in a scalar variable. You can refer to the following perl code snippet for getting yout job done. #! /usr/bin/perl my $x

Re: Infinite loop problem

2005-09-13 Thread Chris Devers
On Tue, 13 Sep 2005, Xavier Noria wrote: > On Sep 13, 2005, at 13:00, Vineet Pande wrote: > > > for ( $position=0; $position < length $protein; ++$protein ) > > Look at the right, you are incrementing $protein instead of $position. And that's (part of) why the usual Perl idiom is to skip C sty

Re: Infinite loop problem

2005-09-13 Thread Xavier Noria
On Sep 13, 2005, at 13:00, Vineet Pande wrote: for ( $position=0; $position < length $protein; ++$protein ) Look at the right, you are incrementing $protein instead of $position. -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]