The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Games::Scrabble -- please use Games::Literati, for a complete Literati/Scrabble resolver.

SYNOPSIS

    use Games::Scrabble;

DESCRIPTION

Games::Scrabble provides functiones to validate and generate words of Scrabble game.

    validate($mywordlist, [word1, word2, word3...]). 

If mywordlist is not given, the 'wordlist' in current working directory will be used.

    generate({ letters => "letters and blanks", 
                   len => "mininum_length, maximum_length", # default 2,7 
                    re => 'regexes',        # use single quotes or q||! 
              wordlist => "......."  } )

Print out scrabble words meet the requirements. len represents minimum and maximum length of the target word, re represents the regex matches against the target words. use "?" to represent blank tiles. wordlist is optional, see validate() above.

Note that repeated letters should be all listed, to indicate how many of them may be used.

Example 1:

    generate({letters => "aquabt?", 
                  len => "2,4", 
                   re => '/q/ && !/u/'});


    qat
    qats

use a(up to 2, actually 3 in this case, since ? can represent a), q, u, t, b and blank tiles to generate 2,3 or 4-letter words contain q but not u, and use 'wordlist' located in current working directory.

Example 2:

    generate({letters => "??"});

find out all valid 2-letters.

Example 3:

    validate(["qat","qatw"]);

find out if "qat", "qatw" are acceptable.

AUTHOR

chichengzhang@hotmail.com.