TASdvlper has asked for the wisdom of the Perl Monks concerning the following question:
I'm storing a hash table, as a scalar, in a single database record. I converted the hash to a scalar using Data::Dumper.
I'm trying to retrieve that record and convert it back to a hash, but am having problems.
Here is the output:if (defined $ref) { print "REF: $ref <br> \n"; $HASH = eval ($ref); %data = %$HASH; } else { %data = {}; } print "MYHASH: $_ $data{$_} <br> \n" for (sort keys %data); +exit;
%data seems to be empty and I don't know why. Any thoughts ???REF: $VAR1 = { 'KeyWordMapper:Modify' => 'notify', 'DispatchHistory:Re +store' => 'notify', 'BuildReport:CSETicketSummary' => 'notify', 'Agen +da:StatusRestore' => 'notify', 'BuildReport:SQATestDetails' => 'notif +y', 'Agenda:Create' => 'notify' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Having problems using eval()
by halley (Prior) on May 20, 2004 at 16:20 UTC | |
by TASdvlper (Monk) on May 20, 2004 at 16:55 UTC | |
|
Re: Having problems using eval()
by Belgarion (Chaplain) on May 20, 2004 at 16:22 UTC | |
by eric256 (Parson) on May 21, 2004 at 04:31 UTC | |
by Belgarion (Chaplain) on May 21, 2004 at 15:56 UTC |