Just another Perl shrine | |
PerlMonks |
Re: Conditionally Substituting multi-line string with single stringby eighty-one (Curate) |
on Jan 15, 2009 at 21:50 UTC ( [id://736690]=note: print w/replies, xml ) | Need Help?? |
I'd approach it differently. For each line, I would check if the line consisted of all N's. If so, set a flag to indicate this, print nothing, and move to the next line Repeat until you find a line that is NOT all N's. At that point, print your ">scaffold00002.$something" line, and the process the current line as appropriate.
In Section
Seekers of Perl Wisdom
|
|