open(my $outfile, ">", "Motif_Result.txt"); ... open(FIH, $patternseq);