in reply to Re: The evolution of a solution to the 11/23 NPR puzzler.
in thread The evolution of a solution to the 11/23 NPR puzzler.
Abigail#!/usr/bin/perl use strict; use warnings; my $file = "/usr/share/dict/words"; open my $fh => $file or die; my %seen; while (<$fh>) { chomp; if (/m$/) { $seen {+lc} ++; next; } elsif (/rn$/) { if ($seen {lc "$`m"}) { print "$`m/$_\n"; } next; } } __END__ bum/burn chum/churn dam/darn hom/horn modem/modern stem/stern tom/torn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The evolution of a solution to the 11/23 NPR puzzler.
by Coruscate (Sexton) on Jan 20, 2004 at 21:26 UTC |