$REPO_HASH {$gqueried_repo} {REPO_BRANCHES} = @branch_list ; # Does not do what you apparently think it does # The result of the assignment above is the number of elements in @branch_list #### $REPO_HASH {$gqueried_repo} {REPO_BRANCHES} = \@branch_list; #Note: Added "\", which makes it a REF to the array #### for my $k (@{ $REPO_HASH {$gqueried_repo} {REPO_BRANCHES} }){ # Process one item of the array in $k }