[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Puzzle thread on clpmod



>>>>> "RJK" == Ronald J Kimball <rjk@linguist.dartmouth.edu> writes:

RJK> On Wed, Jul 07, 1999 at 10:33:46AM -0700, Derek J. Balling wrote:
>> At 01:21 PM 7/7/99 -0400, Ronald J Kimball wrote:
>> >On Wed, Jul 07, 1999 at 12:51:00PM -0400, Chaim Frenkel wrote:
>> > > How about the slightly shorter (join '', sort split //, lc) =~ /^abcde/
>> >
>> >Shorter but incorrect (see clpmod).  It does not work properly with
>> >duplicate letters, and it does not require the 5 letters to be consecutive.
>> 
>> Well the consecutive nature is handled by the sort (which will arrange them 
>> into consecutive order if they're there), so you could try:

RJK> No, the consecutive order is _ruined_ by the sort.  The letters must be
RJK> consecutive in the original word.  After it's sorted, of course they're
RJK> consecutive, but that's meaningless.

Looks like I'm not the only one that understood the problem as
requiring consecutive letters of the alphabet. Not as in the
the letters should be together in the word.

<chaim>
-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe