perl and xml output

B

balasubv

i have 3 arrays as an output froma perl program with values in them
@array1={500,501,503}
@array2={xyz,xyz2,xyz3}
@array3={50,100,5000}
every time i loop through i get new values for these arrays in the same
manner
I would like to present them in an xml /html format
i tried html::table but that dint work exaclty as expected
can i use xml twig or something else to write this to an xml file?

any example would be really nice
thanks
bala
 
G

Guest

: I would like to present them in an xml /html format
: i tried html::table but that dint work exaclty as expected
: can i use xml twig or something else to write this to an xml file?

Have a look at XML::Simple, it should be a good match for your
task; the documentation has lots of examples.

Oliver.
 
T

Tad McClellan

balasubv said:
i have 3 arrays as an output froma perl program with values in them
@array1={500,501,503}
@array2={xyz,xyz2,xyz3}
@array3={50,100,5000}


No semicolons, no quotes around strings, no my() declarations and
curlies instead of parenthesis.

Such a lack of care shows disrespect for the people that you
are asking for help...

I would like to present them in an xml /html format
any example would be really nice


-----------------------------
#!/usr/bin/perl
use warnings;
use strict;

my @array1 = (500,501,503);
my @array2 = ('xyz','xyz2','xyz3');
my @array3 = (50,100,5000);

print "<output>\n";
print "<data>$_</data>\n" for @array1, @array2, @array3;
print "</output>\n";
-----------------------------



You're welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top