Yes, but did you take note of what I said. Parsing XML is hard. Especially if you are new to this stuff: don't reinvent the wheel (see Re: Reinventing the wheel and Re: Reinventing the wheel). Try running the code I supplied. Try running it against a sample of your real data. Skim read the XML::Twig documentation. I know it looks really intimidating, but it contains really good examples and will save you much more time debugging your own hand written XML parsing code than you spend figuring out how to use the module.
On a more general programming style note: "run through the ... multiple times" is almost always a red flag in programming (and most other places too). The more times you have to perform a slow operation the slower the overall job will be. Turn your inner two loops inside out so you read the file once and perform multiple matches per line. Compared with accessing information in memory accessing data from disk is very slow.
In reply to Re^3: I don't understand why I'm getting an "Use of uninitialized value" error
by GrandFather
in thread I don't understand why I'm getting an "Use of uninitialized value" error
by TheBigAmbulance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |