fatherlyons has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I have the following problem.....
#I have two hashes
my %self; my %abldcache;
#I then populate the abldcache array and make self #reference it
$self{abldcache} = \%abldcache;#I then use DataDumper to dump this to a file
print OUTFILE Data::Dumper->Dump([%self->{abldcache}], [qw(self->{abldcache})]);#This works and gives me the following example of output...
$self->{abldcache} = { 'test1' => [], 'test2' => [ 'element1' + 'element2', 'element3' + ] };
#However, I want to produce this in the following format...
$self->{abldcache}->{'test1'} = [], $self->{abldcache}->{'test2'} = [ 'element1' + 'element2', 'element3' + ]
Could anyone tell me how to restructure my hashes so that Datadumper will give me this format???
Thanks in advance for any help you can give.
Edited 2005-02-11 by Ovid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Data Dumper to represent 3 hashes
by Roy Johnson (Monsignor) on Feb 11, 2005 at 20:04 UTC | |
by fatherlyons (Initiate) on Feb 15, 2005 at 12:15 UTC | |
|
Re: Using Data Dumper to represent 3 hashes
by Roy Johnson (Monsignor) on Feb 11, 2005 at 19:34 UTC |