Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
TMTOWTDI answer. :-)
Instead of reading the file line by line as suggested in other answers above, you could also read the entire file into a scalar and use a multi line regexp to do it. Look up use of the /m option on regexp matching. Any Monk who wishes to extend this thread with a complete answer using this method is more than welcome to do so (I'm a bit short of time)
A Monk aims to give answers to those who have none, and to learn from those who know more.
In reply to Re: How to print the lines immediately above and below a matching line?
by space_monk
|
|