The goal has been set for me but I have no idea how to get there. Apologies in advance.
Using Perl - I will be receiving a character delimitated file (whose structure I can dictate) and I need to convert it to a XML like file as such
<MyConfig>
Active = yes
Refresh = 10 min
<Includes>
<Include_Rule_1>
Active = yes
Match = /Foo [Bb]ar/
</Include_Rule_1>
<Include_Rule_2>
Active = yes
Match = /Baz.*/
<Include_Rule_2>
</Include>
<Exclude>
<Exclude_Rule_1>
Exclude = /Bim Bam/
</Exclude_Rule_1>
</Exclude>
</MyConfig>
So in short it will be XML like (individual values are not surrounded by angle brackets) with 3 sections that are constant but their depth will always be unknown.
I can use CPAN libraries but prefer not to as this script will need to run on individual servers that I have neither access to or control of.
Any ideas ? Starters pointers ? Tips or Tricks ?
Sorry I am so lost here.