Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Deepcopy/Perl/deepcopy.pl
Normal file
11
Task/Deepcopy/Perl/deepcopy.pl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
use Storable;
|
||||
use Data::Dumper;
|
||||
|
||||
my $src = { foo => 0, bar => [0, 1] };
|
||||
$src->{baz} = $src;
|
||||
my $dst = Storable::dclone($src);
|
||||
print Dumper($src);
|
||||
print Dumper($dst);
|
||||
Loading…
Add table
Add a link
Reference in a new issue