in reply to Re^2: prob in unfolding Dumper Data at the Server Side Socket prog
in thread prob in unfolding Dumper Data at the Server Side Socket prog
The output is coming as follows::> Dumping the buffer $VAR1 = undef;That's certainly not the output of the code you just posted.
What's that all about? You are receiving a serialized structure in $buffer you should not-store that string in a new structure and serialize it again, you should eval() the $buffer. As already stated by me and others in this thread.my $a = [ $buffer ]; my $d = Data::Dumper->new([ $buffer , $a ]); my $c = $d->Dump;
#!/usr/bin/perl -w use strict; use Data::Dumper; my $fancy_struct = { a => "aaah", b => "beeh", }; my $dumper = Data::Dumper->new([$fancy_struct]); $dumper->Purity(1); my $serialized = $dumper->Dump; print "Serialized form: $serialized"; my $VAR1; eval $serialized || die; my $new_fancy_object_clone = $VAR1; print "a = $new_fancy_object_clone->{a}\n";
|
|---|