http://www.perlmonks.org?node_id=1033668


in reply to Pumping JAPH

This reminds me of something I did a while back. Of course, this approach is much more elegant. The fact that it is entirely determinist is kinda impressive.

I think that the overabundance of / and \ in this code creates a nice visual feeling. There are several ways to add to this: y\\\c instead of length, 1/2e5 instead of 50e-7

Here's a slightly modified version. I also eliminated the C-style for, because I really don't like them.

$/=$|--/10;$\=qq/J,\r/,print!map{substr$\,$/*$\ =~y\\\c,!\//,$_}split/(.{2})/,q/ursetk caanho / .q\tlhreerP \until($/+=1/2e5)>7/2/7;warn qq/\n/