Loading ...
Sorry, an error occurred while loading the content.

Returning Arrays

Expand Messages
  • v_pareto
    The SOAP::Lite User Guide gives an example of how to receive an array at the client-side, but I want to know how to return an array at the server-side. The
    Message 1 of 2 , Feb 19, 2002
    View Source
    • 0 Attachment
      The SOAP::Lite User Guide gives an example of how to receive an array
      at the client-side, but I want to know how to return an array at the
      server-side. The "obvious" thing I tried
      return(@x);
      doesn't work.

      This is actually a prelude to a problem in which I want to return a
      two-dimensional array, so if that's any different, please let me know.

      I am using SOAP::Lite on both the client and server side.
    • Duncan Cameron
      ... Try the equally obvious return @x; ... Strictly speaking, Perl doesn t have two-dimensional arrays, rather an array whose elements are each a reference
      Message 2 of 2 , Feb 20, 2002
      View Source
      • 0 Attachment
        On 2002-02-19 v_pareto wrote:
        >The SOAP::Lite User Guide gives an example of how to receive an array
        >at the client-side, but I want to know how to return an array at the
        >server-side. The "obvious" thing I tried
        > return(@x);
        >doesn't work.

        Try the equally "obvious" return \@x;

        >
        >This is actually a prelude to a problem in which I want to return a
        >two-dimensional array, so if that's any different, please let me know.
        Strictly speaking, Perl doesn't have two-dimensional arrays, rather
        an array whose elements are each a reference to an array

        Return this in the same way, and you'll then have to figure out the
        most convenient way of accessing it at the client.

        Regards,
        Duncan Cameron
      Your message has been successfully submitted and would be delivered to recipients shortly.