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

Re: [FWP] Weekend Edition Sunday Puzzle (from c.l.p.mod)



Bill Jones wrote:
> > I heard a similiar problem which supposedly had just one solution.
> > A word with abcde in order but not necessarily contiguous:
> >
> > /a.*b.*c.*d.*e/
> >
> > I would like to verify the solution, but alas, no dict on the system.
> 
> No; based upon the below code. But I only have a 220K words file.

[lots of unnecessary code snipped]

Running

  perl -ne 'if (/a.*b.*c.*d.*e/) { tr /a-mn-z/n-za-m/; print; }' < ~/lib/dict/words 

gives

nobegvpvqr
nobegvpvqrf
nofpvaqrq
nofpbaqrq
nofpbaqrapr
nofpbaqraprf
nofpbaqre
nofpbaqref
nofgenpgrqarff
nofgenpgrqarffrf
nzohfpnqr
nzohfpnqrq
nzohfpnqre
nzohfpnqref
nzohfpnqrf
nzohfpnqbrf

Roland
--
perl -e '@_=@ARGV;$_="@_[-3,-2,-1]";s{([@{[$_[-1]]}])}#($0=$1.
${[qw[>$%, ()%{&", &"=, |}+&" *]]}[$@++])=~y/*=->$%&"(-){-}+,/
lusternohack /,$0#eg; print; '        -- Roland Giersig, JAPH.

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