in reply to Changing items of an array in a function
use warnings; use strict; my @a = ("a", "b", "c"); @a = Foo(\@a); print "$_ " foreach(@a); sub Foo { my $refA = shift; my @b = @$refA; $b[0] = "hello"; $b[1] = "world"; $b[2] = "Perl"; return @b; }
----------------------------------- --the good, the bad and the physi-- -----------------------------------
|
|---|