sub moduleFunction{ $input = shift; @arrayToBeManipulated = @$input; #manipulations occur here producing a new array with 6 values; @newArray = qw(6 unique values); return \@newArray; }