good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: grab 'n' lines from a file above and below a /match/by been42 (Curate) |
on Sep 17, 2004 at 03:50 UTC ( [id://391654]=note: print w/replies, xml ) | Need Help?? |
I know that I'm showing up a little bit late to the party, but wouldn't Tie::File work for this?
I'm sure there are a million ways to make it look cleaner, but I'm also very sleepy right now. This seems like it would solve the problem, though. I'm really a big fan of Tie::File after having been 'corrected' on my non-usage of it not too long ago. Now I find uses for it everywhere.
In Section
Seekers of Perl Wisdom
|
|