Just for my amusement... It's been awhile since I've done one of these, but a little idea came to me this morning that I played with this evening before turning in. Maybe others will find some amusement in it too.

Enjoy!

$s=q;Just another Perl hacker,;;sub u{;lc pop}for my$i(0..24){push@s, sub{[(r()>.98)?(\&u,\&l)[&r+.5]->((split//,${substr($s,2,1,)})[$i]):( split//,$s)[$i],r()*1.3+$i-.65]}}sub l{uc pop}$|++;for(1..500){;@o=([ "\r"],sort{$a->[1]<=>$b->[-1]}map{;$_->()}@s);print$_->[0x00]for@{[@o ]};select$_->[2],$_->[3],$_->[4],r()*.2;}sub r{rand}sub s{$f->[0]=$s}

Dave

Replies are listed 'Best First'.
Re: Nervous sub
by Grimy (Pilgrim) on Oct 31, 2011 at 18:48 UTC

    That's brilliant! I love the idea, and love how it's done. Here is the same thing, with some additional obfuscation in the same spirit:

    s;;Just another Perl hacker,;;sub u{pop^q q q}$|--;sub _{rand q}}};for my$i(0..24){push@_,sub{[((_()>.99)?\&u:sub{pop})->((/./gs)[$i]),$i+_() *1.3]}}{for$i(1..500){my$_;{print$_->[alarm]for@{[["\r"],(sort{$a->[1] <=>$b->[-1]}map{;$_->$_}@_)]}}select$_->[2]=>$_->[3]=>$_->[4]=>&_*.2}}
Re: Nervous sub
by anneli (Pilgrim) on Oct 24, 2011 at 03:12 UTC

    Bravo! I was not expecting that :D