my ($self, @$objs) = @_; #### # (1) call with a reference to an array my $ref = [1,2,3]; foo(1,$ref); sub foo { my ($self, $aref) = @_; # change the element in $ref $aref->[0] = 3; # make a copy my @array = @$aref; $array[0] = 3; } ######################################## # (2) or call with an array of values my @arr = (1,2,3); foo(1,@arr); sub foo { my ($self, @array) = @_; # @array is already a copy $array[0] = 3; }