use warnings; use strict; use Data::Dump qw(dump); my $a = "one"; my $b = "two"; my $c = \$b; my @d = ($a, $b, $c); my $str = dump(@d); # ("one", "two", \"two") my @newD = eval $str; $newD[0] = "A"; $newD[1] = "B"; ${$newD[2]} = "C";