Topological Sort

Score: 78.53 (pass)

#!perl -ln0
S//\S+/g,/(?

Score: 80.52 (pass)

#!perl -ln0
s//
/;S//(\S+)/g,/(?

Score: 89.52 (pass)

never gonna catch me, Wladimir! :)

#!perl -ln0
s//
/;0//(\S+)/g,/(?

Score: 99.53 (pass)

#!perl -ln0
s//
/;0//(\S+)/g,/(?

Score: 108.49 (fail)

#!perl -ln0
s//
/;/(\S+)/g,($a=$1)?/(?

Score: 108.51 (fail)

Sorry for sending almost the same thing, just hard to debug the code as it passes the test program and all the tests I can think of :)

#!perl -ln0
s//
/;/(\S+)/g,($a=$1)?/(?

Score: 108.53 (pass)

#!perl -ln0
s//
/;/(\S+)/g,($a=$1)=~//?/(?

Score: 111.51 (fail)

#!perl -ln0
s/^(\S+) \1$/$1/gm;/(\S+)/g,($a=$1)?/ \Q$a\E
/?0:do{while(s/^\Q$a\E\s//m){};print$a;//?3:exit}:3/$/while 3

Score: 111.51 (pass)

#!perl -ln0
s//
/;/(\S+)/g,($a=$1)=~//?/(?

Score: 123.49 (fail)

Curse the special cases :)

#!perl -ln0
s/^/
/while s/^(\S+) \1$/$1/m;/(\S+)/g,($a=$1)?/\Q $a\E$/m?0:do{while(s/^\Q$a\E\s//m){};print$a;//?3:exit}:3/$/while 1