use ModuleName qw(moduleFunction); @arrayPassedIn = qw(some values here); #there are 9 values, to be specific. $return = moduleFunction(\@arrayPassedIn); @arrayToPrint = @$return; #### sub moduleFunction{ $input = shift; @arrayToBeManipulated = @$input; #manipulations occur here producing a new array with 6 values; @newArray = qw(6 unique values); return \@newArray; }