data structures, and FreezeThaw for copying them. For example:
use FreezeThaw qw(freeze thaw);
- $new = thaw freeze $old;
+ ($new) = thaw freeze $old;
Where $old can be (a reference to) any kind of data structure you'd like.
It will be deeply copied.