While the story is somewhat chiling, I also wonder exactly how the professor approached the programming part of this. I'm very much doubting he used perl... :-)
Given two English text strings, $a and $b, and two integers $m and $n, 0 < $m <= $n. Both $a and $b have been stripped of punctuation and converted to lower case, leaving all characters as either ('a'..'z') or the space ' '.
Find the perl golf solution (fewest # of characters in code) that returns a list of phrases with at least $m but no more than $n words that are in both $a and $b.
update changed "$m < $n" to "$m <= $n"; shouldn't affect the golf solution, but makes sense if you want to find repeated phrases of only one size. Eg, if $m=$n=1, you could find all single words in common with both strings.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
2001-05-10 Edit by Corion: Fixed title