> No, I think you missunderstood me:
Not at all, see attached script.
> I also found some modules on CPAN, but unfortunately all that I found had
> parts written in C and I need a perl-only module (cross-plattform-able
> without recompiling and finding all that incompatibilities).
Which is why i suggested Data::Dumper.
--
Simon Oliver
use warnings;
use strict;
use Data::Dumper;
my $my_hash = {
a => 1,
b => 2,
r1 => {
c => 3,
d => 4,
},
r2 => {
e => 4,
f => 6,
r3 => {
g => 7,
h => 8,
},
},
};
my $d = Data::Dumper->new([$my_hash], ['my_hash']);
$d->Indent(0);
$d->Purity(1);
my $file = 'out.dump';
open FH, ">$file" or die "Can't open '$file' for writing: $!\n";
print FH $d->Dump;
close FH;
open FH, "<$file" or die "Can't open '$file' for reading: $!\n";
my $new_hash = eval <FH>;
close FH;
print Dumper($new_hash);
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web