Thanks you very much kennethk
I think your method of looping through an array is better. I am having problems with understanding how the push method is supposed to work.
lets say that i have found 10 occurrences of fever and then 20 occurrences of koorts
I have declared an array called hit as suggested.
but what I am not sure is how will 10 will be added to the first element and 20 as the second element. I am very new to Perl so am just finding my feet.
I just realised that each time that each time for for loop is run it will go to the next element and then the number++ is will started again from zero to add up the occurrences of the next element in the array.
i have managed to get the push array function and have performed a few example so i can familiarize myself with it.
one problem when i run the print statement it only shows the total amount not the sub divided amount for each element is my test correct