Perl: Accessing and handling objects in an array
<p>I try to handle the following Array which was generated by <code>get_pool_member_object_status_($pool)</code></p>

<p>from <a href="http://search.cpan.org/~ltp/BigIP-iControl/lib/BigIP/iControl.pm#get_pool_member_object_status_($pool)" rel="nofollow">http://search.cpan.org/~ltp/BigIP-iControl/lib/BigIP/iControl.pm#get_pool_member_object_status_($pool)</a></p>

<pre><code>$VAR1 = [
      [
        bless( [
                 bless( {
                          'member' =&gt; bless( {
                                             'address' =&gt; '192.168.100.141',
                                             'port' =&gt; '80'
                                           }, 'Common::IPPortDefinition' ),
                          'object_status' =&gt; bless( {
                                                    'availability_status' =&gt; 'AVAILABILITY_STATUS_GREEN',
                                                    'status_description' =&gt; 'Pool member is available',
                                                    'enabled_status' =&gt; 'ENABLED_STATUS_ENABLED'
                                                  }, 'LocalLB::ObjectStatus' )
                        }, 'LocalLB::PoolMember::MemberObjectStatus' ),
                 bless( {
                          'member' =&gt; bless( {
                                             'address' =&gt; '192.168.100.142',
                                             'port' =&gt; '80'
                                           }, 'Common::IPPortDefinition' ),
                          'object_status' =&gt; bless( {
                                                    'availability_status' =&gt; 'AVAILABILITY_STATUS_GREEN',
                                                    'status_description' =&gt; 'Pool member is available',
                                                    'enabled_status' =&gt; 'ENABLED_STATUS_ENABLED'
                                                  }, 'LocalLB::ObjectStatus' )
                        }, 'LocalLB::PoolMember::MemberObjectStatus' ),
                 bless( {
                          'member' =&gt; bless( {
                                             'address' =&gt; '192.168.100.143',
                                             'port' =&gt; '80'
                                           }, 'Common::IPPortDefinition' ),
                          'object_status' =&gt; bless( {
                                                    'availability_status' =&gt; 'AVAILABILITY_STATUS_GREEN',
                                                    'status_description' =&gt; 'Pool member is available',
                                                    'enabled_status' =&gt; 'ENABLED_STATUS_ENABLED'
                                                  }, 'LocalLB::ObjectStatus' )
                        }, 'LocalLB::PoolMember::MemberObjectStatus' ),
                 bless( {
                          'member' =&gt; bless( {
                                             'address' =&gt; '192.168.100.144',
                                             'port' =&gt; '80'
                                           }, 'Common::IPPortDefinition' ),
                          'object_status' =&gt; bless( {
                                                    'availability_status' =&gt; 'AVAILABILITY_STATUS_GREEN',
                                                    'status_description' =&gt; 'Pool member is available',
                                                    'enabled_status' =&gt; 'ENABLED_STATUS_ENABLED'
                                                  }, 'LocalLB::ObjectStatus' )
                        }, 'LocalLB::PoolMember::MemberObjectStatus' )
               ], 'LocalLB::PoolMember::MemberObjectStatus[]' )
      ]
    ];
</code></pre>

<p>I couldn't figure out how this should work. I tried several examples from perldsc. The examples there mostly concern ARRAYS OF HASHES. But the above array is...? I don't even know what kind of array this is. Can someone point me in the right direction?</p>

<p>So for example how do I access the <code>"object_status"-&gt;"availability_status"</code> of a  <code>"member"-&gt;"address"</code></p>

<p>Thx simbabque. This is the output I get from <code>Data::Printer:</code></p>

<pre><code>[
[0] [
    [0] LocalLB::PoolMember::MemberObjectStatus[]  {
        public methods (0)
        private methods (0)
        internals: [
            [0] LocalLB::PoolMember::MemberObjectStatus,
            [1] LocalLB::PoolMember::MemberObjectStatus,
            [2] LocalLB::PoolMember::MemberObjectStatus,
            [3] LocalLB::PoolMember::MemberObjectStatus
        ]
    }
]
</code></pre>

<p>]</p>