in reply to Hash checking
My problem has been fixed. Perl was using the values read in as strings. I had to add a "$_+=0;" to my code to force it to be seen as an integer. Once that was done, the rest of the code worked as expected.
Thank you all for your help.