anchorite has asked for the wisdom of the Perl Monks concerning the following question:
but break out of the loop at:/^SEQRES[\s]{2,5}1\s/
so far I have written:/^SEQRES[\s]{2,5}2\s/
PERL returns the error message:while ($line=<INFILE>, $line ne ~/^SEQRES[\s]{2,5}2\s/) { chomp $line; if ($line=~/^SEQRES[\s]{2,5}1\s/) { print "$line\n"; print OUTFILE ("$line\n"); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: more than one condition to a while loop
by dragonchild (Archbishop) on Aug 21, 2003 at 16:51 UTC | |
by tye (Sage) on Aug 21, 2003 at 16:57 UTC | |
by sauoq (Abbot) on Aug 21, 2003 at 21:21 UTC | |
|
Re: more than one condition to a while loop
by davido (Cardinal) on Aug 21, 2003 at 16:55 UTC | |
by davido (Cardinal) on Aug 21, 2003 at 17:01 UTC | |
by anchorite (Initiate) on Aug 21, 2003 at 16:58 UTC | |
|
Re: more than one condition to a while loop
by TomDLux (Vicar) on Aug 21, 2003 at 19:13 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |