I was expecting as mentioned in the link you sent that this particular part of the code would work like a sniffer and decipher more information as to why it fails

Like I said in that link you use $err to get more info about which Unknown Error it is. You only look if the request fails, and only because "Unknown Error" is diagnostically useless. $! expands to "Unknown Error" for too many errors, like

(100)(Unknown error)(100)(Cannot create another system semaphore) (101)(Unknown error)(101)(The exclusive semaphore is owned by another +process) (102)(Unknown error)(102)(The semaphore is set and cannot be closed) (103)(Unknown error)(103)(The semaphore cannot be set again) (104)(Unknown error)(104)(Cannot request exclusive semaphores at inter +rupt time) (105)(Unknown error)(105)(The previous ownership of this semaphore has + ended) (106)(Unknown error)(106)(Insert the diskette for drive %1)
You're also supposed to look at print $response->dump,"\n"; on error, because it might contain more than "Unknown Error"

In reply to Re^5: LWP - 500 Internal Error by Anonymous Monk
in thread LWP - 500 Internal Error by oalvi

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.