http://qs321.pair.com?node_id=768014


in reply to Loosing Negative Values in Array Ref

You have
$tmp->[$i] = '0' unless defined $tmp->[$i]; ... $tmp->[$i] = $aref->[$i] if $aref->[$i] gt $tmp->[$i];
Since a "-" is lt "0", you're never going to be seeing negative numbers.

To get the array in alphabetical order, use sort. You could sort it after you create it, or you can create it in alphabetical order by changing

for my $aref_acc_num (values %$acc_num) {
to
for my $aref_acc_key (sort keys %$acc_num) { my $aref_acc_num = $acc_num->{$aref_acc_key};