in reply to match and read
I'm trying to figure out why you aren't treating the file as XML, and thus using an XML module, such as XML::Twig to parse and deal with it. For example, in this case, you could load it up in XML::Twig, and then cut out twigs that you don't care about. Or the reverse - use xpath to find twigs that you do care about. Or a combination.
It also allows you to reformat the output using a pretty-print mode, or to compress out unneeded whitespace or ... well, there's lots of room for doing wonderful things once you treat the data in the format it is rather than as just another text file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: match and read
by Anonymous Monk on Jan 27, 2006 at 03:54 UTC |