Re: putting practice

[email protected] (Mtv Europe)
Newsgroups perl.golf
Message-ID <[email protected]>
Hello Greg!

[email protected] (Greg Allen) wrote:
> Hurrah: a decoder.. much borrowed, too much added (scores 105).
> 
> #!perl -p
> s#\pL+(`\pL*)?#$_=$&;$1||s/(..)(..)/$1`$2/;/`/?
> ($l=()=/../g)&&join'',/([^`])(?=.{$l}(.)?)/g:reverse#eg

this is more challenging task (albeit not so well-defined since
transformation is not reversable), and here is another solution (92):

-p s#\pL+`?\pL*#join'',@_[(split//,$&)>4?map{$_-
1,$_+@_/2}1..@_/2:@_>3?(0,2,1,3):(2,1,0)]#eg

>> > #    (2)  Words with less than 3 letters will be reversed.

that must be readed as "less or equal" for clarity

---
Mtv Europe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.