Perl Quiz-of-the-Week #9
Mark Jason Dominus <[email protected]> Thu, 19 Dec 2002 17:03:20 -0500
| Newsgroups | gmane.comp.lang.perl.qotw.quiz-of-the-week |
|---|---|
| Organization | Plover Systems |
| Message-ID | <[email protected]> |
IMPORTANT: Please do not post solutions, hints, or other spoilers
until at least 60 hours after the date of this message.
Thanks.
IMPORTANTE: Por favor, no enviéis soluciones, pistas, o cualquier otra
cosa que pueda echar a perder la resolución del problema hasta
que hayan pasado por lo menos 60 horas desde el envío de este
mensaje. Gracias.
IMPORTANT: S'il vous plaît, attendez au minimum 60 heures après la
date de ce message avant de poster solutions, indices ou autres
révélations. Merci.
WICHTIG: Bitte schicken Sie keine Lösungen, Tipps oder Hinweise für
diese Aufgabe vor Ablauf von 60 Stunden nach dem Datum dieser
Mail. Danke.
BELANGRIJK: Stuur aub geen oplossingen, hints of andere tips in de
eerste 60 uur na het verzendingstijdstip van dit
bericht. Waarvoor dank.
VNIMANIE: Pozhalujsta ne shlite reshenija, nameki na reshenija, i
voobshe lyubye podskazki v techenie po krajnej mere 60 chasov
ot daty etogo soobshenija. Spasibo.
Qing3 Zhu4Yi4: Qing3 Ning2 Deng3Dao4 Jie1Dao4 Ben3 Xin4Xi2 Zhi1Hou4 60
Xiao3Shi2, Zai4 Fa1Biao3 Jie3Da2, Ti2Shi4, Huo4 Qi2Ta1 Hui4
Xie4Lou4 Da2An4 De5 Jian4Yi4. Xie4Xie4.
----------------------------------------------------------------
You will write a simple spelling checker program, similar to the Unix
'spell' utility.
The program should be called 'spel'. It will read a document from
standard input and print on standard output a list of all the
misspelled words in the document. If any command line arguments are
given, 'spel' should read those files instead of the standard input.
The output words should be in lexicographic order, and no word should
appear more than once in the output.
'spel' will be given one or more dictionaries of words that are
already spelled correctly. It will always try to read the file
'/usr/dict/words'. It will also try to read '.spel' files from
certain directories. If the user has set an environment variable
SPELWORDS, 'spel' should interpret its value as a :-separated list of
directories to be searched for '.spel' files. If no SPELWORDS
variable is set, 'spel' should search in the user's home directory and
in the current directory.
If you need a sample dictionary, you can obtain one from
http://perl.plover.com/qotw/words/
* * *
P.S.: I'm sorry that this week's quiz (and last week's reports) are
late. I was detained all through Tuesday and Wednesday by other
business. I hope to send out last week's reports tonight.
P.P.S: Yesterday was Perl's 15th birthday. Happy birthday, Perl!