in reply to Re: Complicated datastructre and after merging giving numeric value need help!!
in thread Complicated datastructre and after merging giving numeric value need help!!
Thank you for your response. Yes it worked but when I tried to print each value I am just getting hash reference and not the value.
Below is my code in .pm file I need to produce output like thisfrom the this'/Common/10.116.38.51', 10.116.38.51:1935, enabled:ENABLED, avail +ability:GREEN '/Common/10.116.38.52', 10.116.38.52:1935, enabled:ENABLED, availa +bility:GREEN
print Dumper(@status); $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::Ad +dressPort[]' ); $VAR2 = bless( [ bless( { 'availability_status' => 'A +VAILABILITY_STATUS_GREEN', 'status_description' => 'Pool member is av +ailable', 'enabled_status' => 'ENABLED_STATUS_ENABLED' }, 'LocalLB::O +bjectStatus' ), bless( { 'availability_status' => 'AVAILABILITY_STATU +S_GREEN', 'status_description' => 'Pool member is available', 'enable +d_status' => 'ENABLED_STATUS_ENABLED' }, 'LocalLB::ObjectStatus' ) ], + 'LocalLB::ObjectStatus[]' );
My mail .pm files with has the below code
</code>In main cgi i have the below code
my $membershref = $bigip->locallb_get_member_v +2( $bigip_host, $pool ); if ( !$membershref ){ printError("Failed to find mem +bers for $pool"); } else { # if ( !$membershref ); print '<UL>'; + # Pool Members foreach my $member ( sort keys + %{$membershref} ) { print li( "'$member', $membershref->{$member}->{'address'}:$membershref->{$membe +r}->{'port'}, enabled:$membe +rshref->{$member}->{'enabled'}, availability:$memb ershref->{$member}->{'availability'}" ); } print '</UL>';
But the above code produce below output
'HASH(0xbafd04)', :, enabled:, availability:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Complicated datastructre and after merging giving numeric value need help!!
by Corion (Patriarch) on Oct 24, 2013 at 08:34 UTC |