print Dumper(\@seq); open $fa, "top_10_hexamers.txt"; while(<$fa>) { chomp; $hx{$_}++; #hash of 10 hexamer } print Dumper(\%hx);