in reply to Parsing a complex config file
Why are your hash references all contained in one-element arrays? Can there be more than one hash in a level? I don't see anything about the data format which would support that.
Look into paragraph mode for reading each chunk of data at the "domainN" level.
Is there anything in the data which names the domains for you?
If this is some ad-hoc moving target of a data format, you're in trouble. If there is a real grammar for it, you might look into Parse::RecDescent or one of the other parser generators. The appearance of balanced quotes and parentheses suggests a grammar of some sort, but make a simple regex based parser difficult.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parsing a complex config file
by solitaryrpr (Acolyte) on Jul 12, 2006 at 14:00 UTC |