in reply to (jcwren) RE: Find anagrams
in thread Find anagrams

If it only prints one anagram then that is a bug in your version of Perl. It most certainly prints correctly on both Linux and Windows NT with Perl 5.005_03.

As for input, throw your dictionary at it and see what you get...

Replies are listed 'Best First'.
(jcwren) RE: (2): Find anagrams
by jcwren (Prior) on Sep 21, 2000 at 01:00 UTC
    Well, it appears there are two problems. One is that it's O/S intolerant, and doesn't handle files with CR/LF. The other is that if a word occurs twice (like 'for') it prints 'for for'.

    The first problem was caused by using NOTEPAD.EXE to save some text I cut and pasted from a website to test it.

    Nonetheless, example programs *should* have some sample input and output. After all, if it was a "bug in your version of Perl", how would I know what to expect if it worked?

    --Chris

    e-mail jcwren
      Neither problem is a problem. On Windows your version of Perl should read by default as a text file and it will be fine. In Unix binary and text works fine. The only issue is if you read a DOS file in Unix, in which case I would trust no script not specifically designed to do that. (My production ones are though.) As for "for" and "for" working, the spec said find anagrams. Not find unique anagrams. The program works according to what my co-worker specified.

      As for the input, output issue, mea culpa.