Return to labs index

Perl Lab - jumble
Due: Thursday, September 16 at 11:59PM

Overview

You are given these 2 files: dictionary.txt and jumbles.txt

The jumbles.txt file contains a bunch of scrambled words. Your job is to print out those jumbles words, 1 word to a line. After each jumbled word, print a list of real dictionary words that could be formed by unscrambling the jumbled word. The dictionary words that you have to choose from are in the dictionary.txt file.

Here is a screenshot of a sample run using the 2 input files above:

%./solveJumbles.pl
nwae: wean anew wane
eslyep: sleepy
rpeoims: semipro imposer promise
ettniner: renitent
ahicryrhe: hierarchy
dica: acid cadi caid
dobol: blood
nyegtr: gentry
cukklen: knuckle
warllc: NO MATCHES
addej: jaded
baltoc: cobalt
mycall: calmly
dufil: fluid
preko: poker
dupled: puddle
yaldde: deadly
lasia: alias
nekel: kneel
laurib: burial
lappor: poplar
couph: pouch
celer: creel
ettorp: potter
wardty: tawdry
iddec: diced
pypin: nippy
hartox: thorax
perrim: primer
gluhc: gulch
irrpo: prior
braney: nearby
meefal: female
lubly: bully
noper: prone
dobeny: beyond
kutbec: bucket
shewo: howes whose
alvan: naval
annaab: banana
mopsie: impose
nokte: token
rodug: gourd
rebisc: scribe
hoybis: boyish
milit: limit
pudmy: dumpy
hucnah: haunch
genjal: jangle
%

Step-By-Step

Mad props...

...to Tim Hoffman for this wonderful lab.