in reply to hash table prob..

Try using
use strict; use warnings;

below the shebang line in all your scripts, it will help you.

I find Data::Dumper invaluable when trying to decipher complex data structures.