Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: The evolution of a solution to the 11/23 NPR puzzler.

by grinder (Bishop)
on Jan 20, 2004 at 14:35 UTC ( #322591=note: print w/replies, xml ) Need Help??


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*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://322591]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2021-12-04 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?