in reply to Re: more than one condition to a while loop
in thread more than one condition to a while loop
while ( <INFILE> ) { chomp; if ( /^SEQRES[\s]{2,5}(1|2)\s/ ) { if ( $1 eq "1" ) { print "$_\n"; print OUTFILE "$_\n"; } else { last; } } }
If I thought about it more I'm sure I could clean up that ugly cascading if statement too, but this works and is reasonably efficient.
Dave
"If I had my life to do over again, I'd be a plumber." -- Albert Einstein
|
|---|