#!/usr/bin/perl # Soundex Fun # Brian Ristuccia use Text::Soundex; open DICT, "/usr/share/dict/words" or die "I'm dictless! ($?)"; print STDERR "Loading dictionary..."; while ($word = ) { chomp $word; $se=soundex $word; # print "$se\n"; $words{$se}=$word; } print STDERR "\n"; while ($line = <>) { $line =~ s/(\w*)/$words{(soundex $1)}/gie; print $line; }