printf "%-7s%s\n", "Score", "Value"; for my $scorebit (@scorearray) { printf "%5d %s\n", $scorebit->{'score'}, $scorebit->{'text'}; }