Re: Semcarlbd letrtes sepur! (Scrambled letters super!)

Kripa Sundar <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
Following up to myself <embarassed grin>:

My previous "no guarantee of scrambling" code was:

  || perl -pe 's/\B(\w+)\B/join"",map chop,sort map{rand().$_}split"",$1/eg'

We can drop the parens on the LHS, and change $1 to $&:

  || perl -pe 's/\B\w+\B/join"",map chop,sort map{rand().$_}split"",$&/eg'

I am still keeping the parens for rand().  Dropping them
doesn't seem to hurt the results, except for the apparently
incorrect warning about ambiguity.  How could "rand.$_" be
amiguous?

peace,                          || Rescuing good ideas: Micro venture capital:
--{kr.pA}                       || http://tinyurl.com/gjpd
-- 
"I promise you I will listen to what has been said here, even though \
    I wasn't here." -- George W. Bush [http://slate.msn.com/?id=76886]
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.