Postorder

Score: 59.16 (pass)

(temporarily) puts me in front of all the beginners

#!perl
print eval'/((\w)(.*)\2(\w*))?
*$/s;$_="$2$`$3
$4".pop;'x29

Score: 63.17 (pass)

only 14 to go :)

#!perl
eval's/((.*?)(\w)(.*)\3(\w*))?
*$/"$3$2$4
$5".pop/es;'x29;print

Score: 65.17 (pass)

yuck

#!perl
s/(.*?)(\w)(.+)\2(\w*)
*$|\s+/$2$1$3
$4/sfor($_="@ARGV")x27;print

Score: 68.17 (pass)

this looks more like it, but I'm totally stuck

#!perl -l
s/(.*?)(\w)(.*)\2(\w*-*)$/$2$1$3-$4/for($_="@ARGV")x26;print/\w/g

Score: 85.10 (pass)

wayhey! goto! Now I'm a real programmer!

#!perl -l
($p,$_)=@ARGV;Z:split;for$l($p=~/./g){s/$l/ /,$o=$l.$o,goto Z if$_[-1]=~$l}print$o

Score: 91.09 (pass)

getting better, but plenty of room yet (I hope)

#!perl -l
($p,$_)=@ARGV;while(split){for$l($p=~/./g){s/$l/ /,@a=($l,@a),last if$_[-1]=~$l}}print@a

Score: 119.14 (pass)

ref, not sure why last one rejected. e@ARGV works for me.

#!perl -l
sub e{my($l,$t,$r,$k,$e)="@_"=~/(.*)(.)(.*) \2/;$l=~$_?$k:$e.=$_ for$'=~/./g;$t&&(e($l,$k),e($r,$e),$t)}print e@ARGV

Score: 129.12 (fail)

there must be a purely regex way to do this, but this will do for a 'first' attempt

#!perl -l
sub e{($_,$p)=@_;my($t)=$p=~/./g;my($y,$r)=split$t;($d=$y)=~s//./g;$p=~/.($d)/;my$l=$';$t&&(e($y,$1),e($r,$l),$t)}print e@ARGV