Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Browser choking on XML-headerby dws (Chancellor) |
on Dec 11, 2002 at 19:38 UTC ( [id://219155]=note: print w/replies, xml ) | Need Help?? |
Add some error checking to
my $outfile = new IO::File(">test.xml");
If it fails, you'll be passing
OUTPUT => undef
to the XML::Writer constructor. It looks like XML::Writer defaults to STDOUT in this case.
This would cause your script to emit XML before it's emitted a header, which would cause the error you're seeing. Props to VSarkiss for prodding me to take a second look.
In Section
Seekers of Perl Wisdom
|
|