Hi all, first time posting and a newbie to Perl.

I have a this script that's retuning this message

"not well-formed (invalid token) at line 1, column 3, byte 3: Can't connect to "xxxx.xxxx.com:443" ==^

No such host is known. at C:/perl/perl/vendor/lib/LWP/Protocol/http.pm line 47.

at C:/perl/perl/vendor/lib/XML/Parser.pm line 187. (in cleanup) mkdir Temp/:

Permission denied; Access is denied at C:/perl/perl/site/lib/CGI/Session/Driver/file.pm line 34."

here is my code

use strict; use DBI; use CGI::Session; use CGI qw(:standard); my $query = new CGI; print "HTTP/1.0 200 OK\n"; print "Content-type:text/html\n\n\n"; print"<HTML>\n"; print "<Head>\n"; print "<Title>Members</Title>"; print "</Head>\n\n\n"; print"<body>\n"; my $sid = $query->cookie("CGISESSID") || undef; my $session = new CGI::Session(undef, $sid, {Directory=>'Temp/'}); my ($naijaXMLRequest); $naijaXMLRequest = "<Lastbill>"; $naijaXMLRequest .= "<TransactionType>$trans_type</Transaction +Type>"; $naijaXMLRequest .= "<MerchantID>NAIJAMAN009</MerchantID>" +; $naijaXMLRequest .= "<TransactionID>$transaction_id</Transac +tionID>"; $naijaXMLRequest .= "<MemberNum>$mem_number</MemberNum>"; $naijaXMLRequest .= "<apt>$apt</apt>"; $naijaXMLRequest .= "<aptExpMonth>$month</aptExpMonth>"; $naijaXMLRequest .= "<aptExpYear>$year</aptExpYear>"; $naijaXMLRequest .= "<TotalAmountdue>$amount</TotalAmountdue +>"; $naijaXMLRequest .= "</Lastbill>"; my $mem = new LastBill; $mem->sendHTTP( "$gateway", "$naijaXMLRequest" ); $session->delete(); } } print qq[<script type='text/javascript'>window.open('','_self','');win +dow.close()</script>];

I'm running this on Win R12 IIS 8.5. I'll greatly appreciate any help.


In reply to XML not well-formed (invalid token) by agsoba83

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.