Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Using my /usr/share/words/dict I found 3 different 5 word "solutions". However I disagreed with the dictionary on whether pino and penk are really English words. (Or piro for that matter, but that was in the same line that used pino.) That left just one solution:


    I didn't bother to go through 6 word solutions - there are a lot of them.

    Here is the program that I wrote to find this:

    #! /usr/bin/perl
    use strict;
    use warnings;

    open(DICT, "/usr/share/dict/words") or die "Can't open words: $!";

    • >

      The original Unix* usr/dict/words file was always skewed by Bell Labs terminology. The crossword fanciers' online dict files are usually better for word puzzles. Links to such at foot of my Boston.PM talk on Cheating at Word Puzzles with Perl [] .
      I remember liking thzweb2 file, with web2a good for common phrase puzzles.

      Not that the larger dict matters for this puzzle since there is such a short ladder already, but 'words' having only qw(peal peel perk) as perl

      # I had a sig when sigs were cool
      use Sig;
      • Sensitive how? If perl is not in your dictionary, then reversing the two will result in your never finding perl. If there are multiple paths, reversing can change which path you find. Otherwise it should run forwards as well as backwards.

        It admittedly lacks when it comes to efficiency. However given that most of the time on my machine was scanning the file, I didn't care to optimize.

        • Even if Perl is in dict, starting at perl is faster since it has fewer adjacent ladder words, so search tree starts less bushy (and on average will reamain so), and more next-move-win states since ping has more adjacency.

          Most of the time shouldn't be in file scan unless your machine has no disk cache or the program ran correctly the first and only time! With cache, I am seeing 124ms on building %is_word with a small dict, twice as much loading half dozen dicts including moby. Oh wait, I made one small tweak

          # I had a sig when sigs were cool
          use Sig;