in reply to Changing items of an array in a function
You did pass a reference, but then you created a new array:
my @b = @$refA;
If you change your function to look like this, it might do what you were expecting:
--sub Foo { my $refA = shift; $refA->[0] = "hello"; $refA->[1] = "world"; $refA->[2] = "Perl"; }
|
|---|