in reply to XML::Simple and newlines

Your problem is that your data is being stored as an attrib.

Try the "noattr" option for XML::Simple.

#!/usr/local/bin/perl5.6.0 -w use strict; use XML::Simple; my $xs = XML::Simple->new(); my %data; $data{text} = q{ line 1 text line 2 text line 3 text }; print $xs->XMLout(\%data, noattr => 1)

Outputs:
:!./t1.pl <opt> <text> line 1 text line 2 text line 3 text </text> </opt>
The data will be preserved inside the tags, rather than as
an attrib of the tag itself.
Wonko