in reply to Calling a Variable from another file

This isn't really the best way to store/pull back stuff, but it is quick & dirty (basically just eval your $res string):
# storing: my $data = ... ; # some big hairy data structure open FILE, ">$filename" or die "can't open '$filename': $!"; print FILE Dumper($data); close FILE; # retrieving: open FILE, "$filename" or die "can't open '$filename': $!"; my $VAR1; eval do{ local $/=undef; <FILE> }; # your big hairy data structure is in $VAR1 now close FILE;
You can also play with the Data::Dumper syntax so that the string had "$data =" instead of "$VAR1 =".