This may get you started:
use strict;
#Load the dictionary
my @words;
my %dict;
push @words, split ' ', lc while <DATA>;
map {push @{$dict{join '', sort split '', lc}}, lc } @words;
# "Generate" a letter set
my $letters = join '', sort split '', $words[rand @words];
print "$letters\n";
# Find all the matching words
print join ', ', @{$dict{$letters}};
<p>Adding in the wild card make this a little more interesting, but no
+t much more difficult :)</p>
__DATA__
want
you
file
not
my
that
take
characters
map
on
dictionary
makes
its
earlier
line
yahoo
out
each
cgi
letter
alaphbetically
your
but
possible
too
with
and
logic
combinations
of
time
do
is
all
followed
someone
to
have
takes
from
really
real
able
create
mentioned
going
it
using
concern
can
where
pear
wild
dont
then
game
more
wont
combination
the
way
search
a
would
understand
faster
like
or
in
about
id
this
for
how
enough
anagrams
by
different
cheat
word
thank
be
aepr
best
fear
thousands
up
same
are
words
decrease
check
use
am
verify
help
get
should
say
ability
familiar
i
letters
literati
as
why
fast
DWIM is Perl's answer to Gödel