in reply to storing xml file in hash
You don't give us much to work with. The easiest way is the following:
my $filename = 'test.xml'; open my $fh, '<', $filename or die "Couldn't read '$filename': $!"; my $xml_as_hash = { xml => do { local $/; <$fh> }};
But maybe you wanted something like XML::Simple. In general, you cannot convert an XML file to a hash, because a hash can only have one value per key.
|
|---|