[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Omaha.pm] Pulling in a hash via "exec"...FAIL
On Aug 6, 2008, at 8:03 PM, Dan Linder wrote:
When I'm able to re-write the entire system I'll look at that. :-)
"The entire system?" Here's my Storable version of what you posted to
the list today:
$ cat j.pl
use Storable;
my $fields = {
'FIELD1' => {
FIRSTNAME => 'Joe',
LASTNAME => 'Smith'
}
};
# Write to disk:
store $fields, 'myfile.txt';
# Destroy memory version:
undef $fields;
# Restore from disk:
$fields = retrieve('myfile.txt');
# Show that it worked:
printf("%s %s\n", $fields->{FIELD1}->{FIRSTNAME}, $fields->{FIELD1}->
{LASTNAME});
$ perl j.pl
Joe Smith
All done...?
j