laziness, impatience, and hubris | |
PerlMonks |
Re: Keeping the first occurence of a pattern, and removing the other occurencesby thenaz (Beadle) |
on Aug 04, 2011 at 16:09 UTC ( [id://918581]=note: print w/replies, xml ) | Need Help?? |
Use a look-behind assertion to delete all occurrences that don't follow a store name heading.
Of course, I am assuming the input has UNIX-style line endings (newline character only). If not, you may need to replace "\n" with "\r\n" where appropriate.
In Section
Seekers of Perl Wisdom
|
|