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 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
from the this
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>
sub locallb_get_member_v2 {
my $ENABLED_STATUS_MAP = { "ENABLED_STATUS_NONE" => "NONE", "ENABLED_STATUS_ENABLED" => "ENABLED", "ENABLED_STATUS_DISABLED" => "DISABLED", "ENABLED_STATUS_DISABLED_BY_PARENT" => "DISABLED_BY_PARENT", };
my $AVAILABILITY_STATUS_MAP = { 'AVAILABILITY_STATUS_NONE' => 'Error scenario', 'AVAILABILITY_STATUS_GREEN' => 'GREEN', 'AVAILABILITY_STATUS_YELLOW' => 'YELLOW', 'AVAILABILITY_STATUS_RED' => 'RED', 'AVAILABILITY_STATUS_BLUE' => 'BLUE', 'AVAILABILITY_STATUS_GRAY' => 'GRAY', };
push (@status,@memberobjectstatus); my %members;
foreach my $member (@status){ $members{ $status->{'address'} = $member->{'port'}}; $members{ $status}->{'enabled'} = $ENABLED_STATUS_MAP->{ $status->{'enabled_status'} } ; $members{ $status}->{'availability'} = $AVAILABILITY_STATUS_MAP->{ $status->{'availability_status'} } ;
return \%members; }
</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:

In reply to Re^2: Complicated datastructre and after merging giving numeric value need help!! by nramya82
in thread Complicated datastructre and after merging giving numeric value need help!! by nramya82

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.