nramya82 has asked for the wisdom of the Perl Monks concerning the following question:
Hello , I am very beginner to perl and I am trying to change one existing script to update new API. I have very complicated datastructure which i need to merge and have to print only required fields. But when I merge I get only numeric value. Can some one please suggest any idea? My code:
VAR1 = 2; I am not sure what I am doing worng here. I need @status which to have all the data so that I can sort out keys and print address, port,availability.my @member_lists = @{$soapResponse->result}; my @memberobjectstatus = @{$soapResponse->result}; my @status = push (@member_lists,@memberobjectstatus); use Data::Dumper; print Dumper(@status); orginal @member_lists = $VAR1 = bless( [ bless( { 'address' => '/Common/10.116 +.38.51', 'port' => '80' }, 'Common::AddressPort' ), bless( { 'address +' => '/Common/10.116.38.52', 'port' => '80' }, 'Common::AddressPort' +) ], 'Common::AddressPort[]' ); @memberobjectstatus = @ $VAR2 = bless( [ bless( { 'availability_status' => 'AVAILABILITY_STA +TUS_GREEN', 'status_description' => 'Pool member is available', 'enab +led_status' => 'ENABLED_STATUS_ENABLED' }, 'LocalLB::ObjectStatus' ), + bless( { 'availability_status' => 'AVAILABILITY_STATUS_GREEN', 'stat +us_description' => 'Pool member is available', 'enabled_status' => 'E +NABLED_STATUS_ENABLED' }, 'LocalLB::ObjectStatus' ) ], 'LocalLB::Obje +ctStatus[]' );
Like this $VAR1 = bless( [ bless( { 'member' => bless( { 'address' => '192.150.1 +6.166', 'port' => '80' }, 'Common::IPPortDefinition' ), 'state' => 'S +TATE_ENABLED' }, 'GlobalLB::PoolMember::MemberEnabledState' ) ], 'Glo +balLB::PoolMember::MemberEnabledState[]' );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Complicated datastructre and after merging giving numeric value need help!!
by kennethk (Abbot) on Oct 23, 2013 at 19:03 UTC | |
by nramya82 (Initiate) on Oct 23, 2013 at 22:16 UTC | |
by Corion (Patriarch) on Oct 24, 2013 at 08:34 UTC |
Back to
Seekers of Perl Wisdom