in reply to XML::Simple / XMLout Question
Yes, see eval but this is not the best way to build XML.
poj#!/usr/bin/perl use strict; use XML::Simple 'XMLout'; my $samstr = 'source=>[ { abc => [ { uname =>["USER"], dbcrdn=>["PWD"], paridn=>["XYZ"], osath =>["0"], }] }]'; my $xmlstr; eval '$xmlstr = {'.$samstr.'}'; print XMLout($xmlstr,RootName => "root");
|
|---|