use strict;
use warnings;
use feature 'say';
my @orig = (1, 2, 3);
# assigning an array copies its elements
my @copy = @orig;
$copy[0] = 99;
say $orig[0]; # still 1
# two refs to the SAME array share edits
my $r1 = \@orig;
my $r2 = $r1;
$r2->[0] = 77;
say $orig[0]; # now 77assignment copies, refs share