![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Homework helpby radiantmatrix (Parson) |
on Oct 29, 2004 at 19:15 UTC ( #403877=note: print w/replies, xml ) | Need Help?? |
Firstly, grep is excessive. Since your keys are upper-case, simply use uc to upper-case things before matching. Note that it reads STDIN until EOF -- Ctrl-D on Unix/Linux and Ctrl-Z on Windows (followed by Enter on some of both types of systems). Or you can pipe in a word list... but you needn't have one word per line, as long as you use space between them. Also, because of how hashes function, it will only print one instance of each word. By the way, you aren't checking to make sure the word is possible in Scrabble: there are a limited quantity of each letter... :)
radiantmatrix
require General::Disclaimer; "Users are evil. All users are evil. Do not trust them. Perl specifically offers the -T switch because it knows users are evil." - japhy
In Section
Seekers of Perl Wisdom
|
|