sub main_process { .... ## Just reusing the array from outside the loop/sub will save a lot of time ## and some space. ## DELETE my @input_seqs = getSeqfromfasta2lmers($file); ## This doesn't appear to be used anywhere, but if I missed it and it is ## replace references to $ip with $nofseq ## DELETE my $ip = @input_seqs;