Data::Dumper is a perl module that's often used to save and restore arbitrary data structures (including objects.) The beauty of Data::Dumper is that it writes out the data structure as a string which can be simply eval'd back to whatever it was before.
A trivial example is:
use vars qw / $VAR1 /;
my $data = 1, 2, 3, 4, 5 ;
my $saved_data = Dumper( $data );
my $resored_data = eval ( $saved_data );