#!/usr/bin/perl -w use strict; open WORDS, "/usr/share/dict/words" or die; my @words = ; chop @words; close WORDS; printf "Loaded %d words.\n", scalar @words; # Favor long words @words = sort { length $b <=> length $a } @words; my $re = join '|', map quotemeta, @words; while (<>) { study; # ?? 1 while s/$re/[*]/io; print; }