in reply to The evolution of a solution to the 11/23 NPR puzzler.

Assuming you pipe the contents of a dict type file into the following script:

#! /usr/bin/perl my %stem; while( <> ) { chomp; next unless /^(.*)(?:m|rn)$/; print "${1}m -vs- ${1}rn\n" if ++$stem{$1} == 2; }

... on FreeBSD 5.2 this produces the following:

album -vs- alburn am -vs- arn bam -vs- barn bom -vs- born bum -vs- burn chum -vs- churn cum -vs- curn dam -vs- darn dom -vs- dorn dum -vs- durn gam -vs- garn gim -vs- girn ham -vs- harn hem -vs- hern kim -vs- kirn leam -vs- learn scam -vs- scarn sham -vs- sharn stam -vs- starn stem -vs- stern swom -vs- sworn tam -vs- tarn tum -vs- turn um -vs- urn yam -vs- yarn

The only trouble is... I can't figure out which pair are the antonyms (mad props to halley :-). To tell the truth, I don't even know what a "swom" is...

Replies are listed 'Best First'.
Re^2: The evolution of a solution to the 11/23 NPR puzzler.
by particle (Vicar) on Jan 20, 2004 at 19:59 UTC
    The only trouble is... I can't figure out which pair are the antonyms

    ...and yet half the answer was right there in your script!

    my %stem;

    ain't english grand?

    ~Particle *accelerates*