diamondsandperls has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: posting xml data
by hippo (Archbishop) on Apr 30, 2013 at 21:56 UTC
    use strict; use warnings; use Mail::Sendmail; my $xml = qq#<?xml version="1.0" encoding="windows-1252"?> <node id="972305" title="diamondsandperls" created="2012-05-24 15:58:2 +7" updated="0000-00-00 00:00:00"> <type id="15"> user</type> <author id="972305"> diamondsandperls</author> <data> <field name="doctext"> </field> <field name="lasttime"> 2013-04-30 16:51:07</field> <field name="experience"> 187</field> <field name="user_scratchpad"> 972306</field> <field name="imgsrc"> </field> <field name="timeformat"> </field> <field name="numwriteups"> 74</field> <field name="location"> </field> <field name="timezone"> </field> <field name="codewrapoff"> </field> <field name="codewraplength"> </field> <field name="codeautowrap"> </field> <field name="codeprefix"> </field> <field name="codebig"> </field> </data> </node> #; my %mail = ( 'To' => 'bill@microsoft.com', 'From' => 'diamondsandperls@perlmonks.org', 'Subject' => 'Some XML', 'Content-Type' => 'application/xml', 'Message' => $xml ); sendmail (%mail) or die $Mail::Sendmail::error; exit;

    That should post your XML data nicely.

Re: posting xml data
by marto (Cardinal) on May 01, 2013 at 12:57 UTC
Re: posting xml data
by Old_Gray_Bear (Bishop) on May 01, 2013 at 15:18 UTC
    I bracket the XML with code tags when posting on the PM.

    ----
    I Go Back to Sleep, Now.

    OGB