You could get the effect of a deep copy by serializing
and deserializing a data structure, using some method
of serialization. Eg. Data::Dumper or Storable.
Or you could also investigate the Clone module,
which I've not seen before but which is on CPAN. It
looks like it should do what you want: