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

Re: [FWP] Puzzle thread on clpmod



>>>>> "JP" == John Porter <jdporter@min.net> writes:

JP>     while ( /[a-e](?=[a-e]{4})/g ) {
JP>       join( '', sort split //, substr( $_, pos()-1, 5 ) ) eq 'abcde' or next;

You need an lc in there, some words are capitalized.

How about the slightly shorter (join '', sort split //, lc) =~ /^abcde/

<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