Thanks! but for my assignment i only have to count all the words in a file. Thats why I used hashes....but i found the powerful use of EXISTS :P. Make life so much easier. Now my problem is sorting the results of each word by acending or decending order.