sub foo {
my @foo = @{[@{$_[0]}]};
# etc
}
####
sub foo {
my @foo = @{$_[0]};
# etc
}
####
my $bar = ["hello", "world"];
foo($bar);
print "$bar->[0]\n";
sub foo {
# Make my copy.
my @foo = @{$_[0]};
# Try to mess up the first element.
$foo[0] =~ s/h/H/;
}