Thank you so much for your reply. The first one printed out some results but I don't seem to be getting it to group the ID's together. Maybe I did something wrong when I was importing the different code?? I'm not sure. I so much appreciate your looking at this for me. This is the code I just tried to use:
#!/usr/bin/perl -w open (IN, "c:/work/Abnova_Grouping/Abnova_App_and_Key.txt"); open(OUT, ">c:/work/Abnova_Grouping/Abnova_App_and_Key_Sorted.txt"); my%AB; while(<IN>){ chomp; my($id, $prod_num, $app, $note)=split /\s^,\s^/; $AB{$id}{app} .= ",$app"; $AB{$id}{prod_num}="$prod_num, $note"; } for (keys %AB) { $AB{$_}{app}=~s/^,//} for my $id (sort keys %AB){ print OUT "$id, $AB{$id}{prod_num}, $AB{$id}{app} \n"; } close IN; close OUT;
Thank you again for your help!!
In reply to Re^2: Hashes with Multiple Keys and Combining Them
by de2425
in thread Hashes with Multiple Keys and Combining Them
by de2425
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |