use Storable qw(dclone); my @a = ([2, 3], [5, 6]); my $copy_ref = dclone(\@a); my @copy = @{ dclone(\@a) };