in reply to Help with words scrambled

Depending on your font and how drunk you are, the letters "b", "h", and "k" might look alike. So remap them all to the letter "b". Do this for any other look-alikes.

This is sort of like Text::Soundex, except with the look instead of sound of a word.

#!/usr/bin/perl use warnings; use strict; my %dict; @ARGV = 'words.txt'; while (<>) { chomp; my $word = $_; tr/gq9xz2mwbhk68ilj1acenosu05/gggzzzmmbbbbbiiiiaaaaaaaaa/; $dict{$_} .= "$word "; } while (<DATA>) { chomp; my $word = $_; tr/gq9xz2mwbhk68ilj1acenosu05/gggzzzmmbbbbbiiiiaaaaaaaaa/; my $matches = $dict{$_} || '~'; print "$word: $matches\n"; } __END__ sk0oid