use strict; &specific(); sub callme { my ($array,$i) = @_; $array->[$i] = "printme-"; # note the arrow operator } sub specific { my $array = [(0..5)]; &callme($array,$_) for (0..$#$array); print join("\n", @$array), "\n"; } #### # this is not really correct: my @array = [0,1,2,3,4,5]; # use this: my $array = [(0,1,2,3,4,5)]; # or this: my @array = (0,1,2,3,4,5);