in reply to How does my $self = (@_) actually work?
If it's just a one-level hash, you could copy it like this:
my %copy = %{ $self }; # or my $copy = { %{$self} };
If you want to copy a nested data structure, check out How do I print out or copy a recursive data structure? in the perlfaq.
|
|---|