use strict; use warnings; use Storable; my %h2; my %hash = ( 'roster' => { 'mike' => 'biology', 'carol' => 'math', 'tom' => 'history', }, 'courses' => { 'math' => 'full', 'biology' => 'open', 'art' => 'open', } ); store( \%hash, "test.dat" ); %h2 = %{ retrieve "test.dat" }; for ( sort keys %h2 ) { print "$_: @{[values %{$h2{$_}}]}\n"; }