How about Clone?
UPDATE: some codeuse strict; use warnings; use Clone qw(clone); use Data::Dumper; my $str; $str .= "{ $_ => " for 'a'..'z'; $str .= '}' x 26; my $orig = { nested_hash => eval $str, code_ref => sub { my $foo = 'bar'; sub{$foo} }, }; my $clone = clone($orig); print Dumper $clone->{nested_hash}; print $clone->{code_ref}->()->(), $/;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to (jeffa) Re: Deepcopy of complex structures.
by jeffa
in thread Deepcopy of complex structures.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |