Hi Am getting an intermittent error on a script calling an API service that has worked ok in the past - error message as follows:
Unsuccessful stat on filename containing newline at /usr/local/share/p +erl/5.8.8/XML/Simple.pm line 939. File does not exist: 500 read failed: [error relating to failure of line in program reproduced in snippet be +low]
The context is where the subroutine calling the API service fails (using XML::Simple to parse the returned object
my $response = $userAgent->request($request); my $som=$response->{'_content'}; #print Dumper(\$som); my $result = XMLin($som); # Line where failure occurs.
I'm assuming if the sub XMLin failed that the file was not found? However, I'm not familiar with what the error message means exactly, tried googling didn't get far. What should I do to get to the bottom of this? Also, at the moment the program crashes out if the error is encountered. Any tips on catching this particular error and continuing appreciated. Thanks Colin

In reply to File does not exist: 500 read failed by CColin

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.