First of all, you are amazing. Thank you for your help. One thing I didn't put in my example and should have, is some of the diagnosis codes in my arrays start with a letter (e.g., V21564, c5415). So, I am struggling with your lines that say:
for (sort { $a <=> $b } keys %{ $Diags{$key} } ) { if (exists $DiagCodes{$_}) { printf $fh1 " %s: %d, %d\n", $DiagNames{ $DiagCodes{$_} }, $_, $Diags{$key}->{$_}; } else { printf $fh1 " Unrecognized code: %d\n", $_; } }
because they are set up for a numeric value with the <=>, so I changed it to:
foreach (sort {$a cmp $b} keys %{$Diags}$key}})
I tried some other things, but that is the one with the least errors, although it is still not running through. I PROMISE this will be the last question I ask for a long time!! Any insight you can give would be amazing!
In reply to Re^6: Putting Hash values into an array
by Raya4505
in thread Putting Hash values into an array
by Raya4505
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |