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;

And then you modify that new array which is only scoped inside the function, which leaves the array-by-reference argument as-is.

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"; }
--
3dan