marvell has asked for the wisdom of the Perl Monks concerning the following question:
The following code does not work.
#!/usr/bin/perl use Data::Dumper; $old = { name => "bob" }; $young = { name => "bob jr" }; $old->{child} = $young; $young->{parent} = $old; $string = Data::Dumper->Dump([$old],[qw(old)]); undef $old; undef $young; eval $string; $check = Data::Dumper->Dump([$old],[qw(old)]); if ($string ne $check) { print "eek!\n---\n$string---\n$check"; }
This, I imagine, is due to the cyclic nature of the structure.
Any ideas?
--
¤ Steve Marvell
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: evaling dumped cyclic structures
by valdez (Monsignor) on Nov 27, 2002 at 16:47 UTC | |
Re: evaling dumped cyclic structures
by Aristotle (Chancellor) on Nov 27, 2002 at 16:36 UTC | |
Re: evaling dumped cyclic structures
by demerphq (Chancellor) on Nov 27, 2002 at 17:12 UTC |
Back to
Seekers of Perl Wisdom