From: Don Armstrong Date: Sat, 17 Jan 2009 00:58:48 +0000 (+0000) Subject: * update anamang X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c9eda2ce519f4545d3930e4da9da303e58475c4e;p=bin.git * update anamang --- diff --git a/anamang b/anamang index 54cd32b..78f0ea3 100755 --- a/anamang +++ b/anamang @@ -119,13 +119,12 @@ if (not @words) { exit 1; } -my $database = update_and_load_database($options{database_dir},$options{wordlist}); - # letter order my @l_o = ('a'..'z'); my %l_o; @l_o{@l_o} = (0 .. 25); +my $database = update_and_load_database($options{database_dir},$options{wordlist}); # run through and use the database @@ -270,6 +269,8 @@ sub update_and_load_database { chomp; next unless length $_; my $word = lc($_); + $word =~ s/[^a-z]//; + next unless length $_; next if exists $seen_words{$word}; $seen_words{$word} = 1; if ((keys %seen_words) % 100 == 0) {