more useful options | |
PerlMonks |
add values with hashby steph_bow (Pilgrim) |
on Mar 11, 2008 at 13:19 UTC ( [id://673489]=perlquestion: print w/replies, xml ) | Need Help?? |
steph_bow has asked for the wisdom of the Perl Monks concerning the following question: Dear Monks, My program uses a hash table to capture data, but for the same key there are several values in the input files. So I had to make two hash tables because there are two different values for the same key. It works. But I do not know how to generalise with three or more without having to use my %hash_3, my %hash_4, ... Could you check ? Thanks
Here is the code
Here are the two input files Here is the input file "animals.txt"
Here is "countries_list"
And here are the output results
Back to
Seekers of Perl Wisdom
|
|