Posted by <corff on 04/13/06 08:36
In comp.lang.perl.misc André Hänsel <andre@webkr.de> wrote:
: Or in words: In a configuration file I have _nested_ conditional blocks
: in the format (condition)?{content_when_true}:{content_when_false}
: while the false content ist optional.
Hint "configuration file": CPAN has a number of configuration file modules,
did you have a look at them?
Hint "nested": Nested data are preferrably tackled by a parser, not a regex.
: If you have any completly different solution I'll be glad to hear it,
: too. :)
Yes. The XML::Simple module. You have full control over your nested data
structures and can easily evaluate branches of your data conditionally.
Provided, however, that your regex in the beginning didn't describe your
final data format but rather a model of what you want to achieve.
Oliver.
--
Dr. Oliver Corff e-mail: corff@zedat.fu-berlin.de
[Back to original message]
|