#!/usr/bin/perl -w use strict; use diagnostics; # open DICT, "/usr/dict/words"; open DICT, "/tmp/web2.txt"; my @words_of_15_letters; while () { push @words_of_15_letters, $_ if /^.{15}$/; } print "Number of words found ", scalar @words_of_15_letters, "\n"; foreach my $word (@words_of_15_letters) { my %letter_count; my $repeat_found; foreach my $letter (split //, $word) { $letter_count{$letter}++; } foreach (keys %letter_count) { $repeat_found = 1 if $letter_count{$_} > 1; } print $word unless $repeat_found; }