Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Like everyone else, I'm not sure I understand the question.
But I think what you mean is "I want to start printing when I see regex 1, and stop printing when I see regex 2"... (Edit: Aha, looking at your 2nd post, that does seem to be what you want) If so, here goes: Now, if start regex and end regex match on the same line, this won't print at all. You have to figure out if that's what you want or not. Also, if you have start...end...start...end in the same file, this will print two sets of lines for a given file. If that's not what you want, you could add a %done hash keyed on $ARGV as well...
Hope this helps!
In reply to Re: I'm looking for a one-liner filter 'twixt two regexes
by RMGir
|
|