#!perl
sub r{pop=~/./;my$r=$&,$s=$';pop=~/$r/;my$t=$';push@_,$`,$s;$`&&&r;$t&&r($t,$s);print$r}r@ARGV;print$/
|
This is still shocking - two my's and all. *sigh*
#!perl
sub r{my($r,$s)=pop=~/(.)(.*)/;pop=~/$r/;my($e,$t)=($`,$');$u=$s;$e&&r($e,$s);$t&&r($t,$u);print$r}r@ARGV;print$/
|
Just something to get going with.
#!perl
sub r{($_,$i)=@_;my($r,$s)=/(.)(.*)/;$i=~/$r/;my($e,$t)=($`,$');r($s,$e)if$e;r(substr($_,1),$t)if$t;print$r;}r@ARGV;print$/
|