Tom_Jones z9062 John_Smith V27783 Tom_Jones z9062 Jane_Brown 9100 Tom_Jones 28741 John_Smith z9062 Tom_Jones z9062 Jane_Brown z9062 Tom_Jones 28741 Jane_Brown c2853 Jane_Brown z9062 Tom_Jones 12345 #### my @ComplicationsSurgicalProcedMedCare_238 = ( 27661, 'V27783', 27788, 'c2853', 28741); my @SuperficialInjuryContusion_239 = ('z9062', 9063, 9100, 9101); #### my @ComplicationsSurgicalProcedMedCare_238 = qw(27661 V27783 27788 c2853 28741); my @SuperficialInjuryContusion_239 = qw(z9062 9063 9100 9101); #### if (exists $DiagCodes{$_}) { printf $fh1 " %s: %d, %d\n", # *** Change here: ^ $DiagNames{ $DiagCodes{$_} }, $_, $Diags{$key}->{$_}; } else { printf $fh1 " Unrecognized code: %d\n", $_; # *** Change here: ^ } #### if (exists $DiagCodes{$_}) { printf $fh1 " %s: %s, %d\n", $DiagNames{ $DiagCodes{$_} }, $_, $Diags{$key}->{$_}; } else { printf $fh1 " Unrecognized code: %s\n", $_; }