in reply to Loosing Negative Values in Array Ref
Since a "-" is lt "0", you're never going to be seeing negative numbers.$tmp->[$i] = '0' unless defined $tmp->[$i]; ... $tmp->[$i] = $aref->[$i] if $aref->[$i] gt $tmp->[$i];
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
tofor my $aref_acc_num (values %$acc_num) {
for my $aref_acc_key (sort keys %$acc_num) { my $aref_acc_num = $acc_num->{$aref_acc_key};
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Loosing Negative Values in Array Ref
by Anonymous Monk on Jun 03, 2009 at 13:57 UTC | |
by Thelonius (Priest) on Jun 03, 2009 at 14:32 UTC | |
by Anonymous Monk on Jun 03, 2009 at 14:43 UTC | |
by Thelonius (Priest) on Jun 03, 2009 at 16:01 UTC | |
by Anonymous Monk on Jun 03, 2009 at 14:26 UTC | |
Re^2: Loosing Negative Values in Array Ref
by Anonymous Monk on Jun 03, 2009 at 14:35 UTC | |
by Marshall (Canon) on Jun 03, 2009 at 23:16 UTC |