in reply to Save hash value?

OT, or at best, "tangential", but you really should make a practice of

use strict; use warnings;

and, when stumped despite their assistance,

use diagnostics;