my @status = push (@member_lists,@memberobjectstatus);
From push:
- push ARRAY,LIST
- push EXPR,LIST
Treats ARRAY as a stack by appending the values of LIST to the end of ARRAY. The length of ARRAY increases by the length of LIST... Returns the number of elements in the array following the completed push.
push changes the array and returns the length of the array. What you probably mean is:
my @member_lists = @{$soapResponse->result};
my @memberobjectstatus = @{$soapResponse->result};
my @status = @member_lists;
push (@status,@memberobjectstatus);
use Data::Dumper;
print Dumper(@status);
This copies the list, and then updates it.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|