ahh..That fixed it. Thank you very much. One quick question, how do I avoid having to save the huge dataset in memory by processing and printing the results on fly? I would like to undef the HASH at after each second in time i.e create a loop for each key and undef my %HOH. Any ideas how/where I can add the control statement for $key?