( # this is [0], a hash ref [...] ), #### my $data = extract(); print $data->{content}->[0]->{A}->[1]; sub extract { my %data = ( site_name => "site name", content => [ # array ref { # this is [0], a hash ref handicap => [ 0, "asia", "BigSmall" ], A => [ "name", "asia_score", "BigSmall_score" ], B => [ "name", "asia_score", "BigSmall_score" ], }, { # this is [1] handicap => [ 0, "asia", "BigSmall" ], A => [ "name", "asia_score", "BigSmall_score" ], B => [ "name", "asia_score", "BigSmall_score" ], }, ], ); return \%data; } #### asia_score