# script 1 use strict; use warnings; use Storable; my $storable_file = 'store.file'; $var = complicated multilevel structure; store(\$var,$storable_file); # script 2 use strict; use warnings; use Storable; my $storable_file = 'store.file'; my $var = retrieve($storable_file); unlink $storable_file; open my $outfile,'>','output.file'; print $outfile $var; close $outfile;