in reply to Apache::ConfigFile iterate problem
Here's my understanding of what your situation. First, you have a complex data structure ("Hash of Hashes of (Hashes/Arrays)"). Second, you want to put this complex data structure into an XML file. Is that correct?
Assuming that my description above is correct, one method would be to use XML::Simple to generate the XML for you. The code for doing that would be something like this:
use strict; use XML::Simple; my $data; # insert code to create complex data structure in $data; my $xml = XMLout($data, XMLDecl => 1); open(FH,">output.xml") || die "Unable to open 'output.xml': $!\n"; print FH $xml; close FH;
If you don't care for XML::Simple, there are other modules that might be able to do something similar. I mentioned this module because I've used it and it sounded like you already had a data structure that could be used as is by this module.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Apache::ConfigFile iterate problem
by tpais (Novice) on Sep 07, 2010 at 05:43 UTC |