perl -e 'sub c { my $w = shift; if ($#_) { for $i (0..$#_) { my @w = @ +_; &c ($w . splice (@w, $i, 1), @w); } } else { $p{ $w . $_[0] } = q( +) } }; &c ( q(), split //, $ARGV[0] ); $\ = qq(\n); open D, q(/usr/sh +are/dict/words); while(<D>) { chomp; s!\s+!!; print if exists $p{$_}; + }' ___LETTERS___
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Anagram Solver
by tilly (Archbishop) on Jan 08, 2001 at 22:11 UTC | |
|
Re: Anagram Solver
by salvadors (Pilgrim) on Jan 08, 2001 at 22:24 UTC | |
by mkmcconn (Chaplain) on Jan 09, 2001 at 18:23 UTC | |
by chipmunk (Parson) on Jan 09, 2001 at 23:21 UTC | |
by salvadors (Pilgrim) on Jan 10, 2001 at 16:07 UTC |