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

In reply to Re: literati cheat / finding words from scrambled letters by GrandFather
in thread literati cheat / finding words from scrambled letters by sulfericacid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.