use Storable qw[ freeze thaw ];; $x = freeze \@d;; $y = thaw $x;; pp $y;; ["one", "two", \"two"] ${ $y->[2] } = 'three';; pp $y;; ["one", "two", \"three"]