I won't comment on the difference between $! and $@, because others have done a better job than I could do. I would like to recommend that you take a look at SOAP::Lite. It can be used to create both clients and servers (as standalone or as CGI). It moves you higher up the protocol stack, but it should eliminate your problems.

You can pass any native Perl value through. It handles converting it to and from SOAP formats. You can pass XML through as a string or if your XML is based on Perl arrays or hashes you can pass those right through instead. In one of my programs it removed a hundred or more lines of Perl code on the client and replace it with about 10 lines (much easier to maintain..:). It also has a compression option which can save bandwidth.

The SOAP::Lite Cookbook can be found here if you are interested.

Cheers,

John


In reply to Re: $! and $@ peculiarities by raptnor2
in thread $! and $@ peculiarities by linux454

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.