I think I understand your problem, and here is what I would do:
open(FILEHANDLE, "<hash.dat") or die("boo! error");
while(<FILEHANDLE>){
print $_;
%hash = split(" ", <FILEHANDLE>);
}
update: and by the way, sorry for the bad format of the post..... will read up now