use strict; use Storable qw(nstore); my %hash = my_build_hash_sub(); nstore (\%hash, "hash.nstore.dat"); #### use strict; use Storable; my %hash = %{ retrieve("hash.nstore.dat") };