Topological Sort

Score: 37.44 (fail)

This is of course cheating and works only on Unix. (but I thought I'd submit it anyway :-)

#!perl
print$_=`tsort&1`;exit(/ /)

Score: 112.52 (fail)

Yay! Not a single ; in sight

#!perl -p0
$n++>8*y/
//&&die while
s/^((\S+) \S+
)(.*^\S+ \2
)/$3$1/sm||s/( \S+)(
.*\1
)/$2/s||s/ /
/||s/^(\S+
)\1/$1/m

Score: 112.52 (fail)

Yay! Not a single ; in sight

#!perl -p0
$n++>8*y/
//&&die while
s/^((\S+) \S+
)(.*^\S+ \2
)/$3$1/sm||s/( \S+)(
.*\1
)/$2/s||s/ /
/||s/^(\S+
)\1/$1/m

Score: 124.54 (fail)

#!perl -p0
$n++>8*y///c&&die while
s/^((\S+) \S+
)(.*^(?!\2 )\S+ \2
)/$3$1/sm||s/( \S+)(
.*\1
)/$2/s||s/ /
/||s/^((\S+
).*^)\2/$1/m

Score: 127.52 (pass)

#!perl -p0
$n++>8*y///c&&die while
s/^((\S+) \S+
)(.*^(?!\2 )\S+ \2
)/$3$1/sm||s/( \S+)(
.*\1
)/$2/s||s/ /
/||s/^(\S+
)(.*^)\1/$1$2/ms

Score: 128.48 (pass)

#!perl -nl
/ /;\$p{$`};$`eq$'||++$p{$'}^push@{$s{$`}},$'}{1while map{delete$p{$_};--$p{$_}for@{$s{$_}};print}grep!$p{$_},keys%p;%p&&die

Score: 129.49 (pass)

#!perl -nl
/ /;\$p{$`};$`eq$'||++$p{$'}&&push@{$s{$`}},$'}{1while map{delete$p{$_};--$p{$_}for@{$s{$_}};print}grep!$p{$_},keys%p;%p&&die

Score: 140.51 (fail)

#!perl -pl
sub i{($n{$_}=my$n=1+pop)>$.&¨i($n)for@{$g{$_}}}/ /;$n=\$n{$`};push@{$g{$`}},$_=$';$`eq$'||i$$n}{$_=join$\,sort{$n{$a}-$n{$b}}keys%n

Score: 146.50 (fail)

#!perl -pl
sub i{my$n=pop;$n{$b=$_}=++$n;$n>$.?die:i($n)for@{$g{$b}}}/ /;$n=\$n{$`};push@{$g{$`}},$_=$';$`eq$'||i$$n}{$_=join$\,sort{$n{$a}-$n{$b}}keys%n

Score: 152.50 (fail)

#!perl -pl
sub i{my$n=pop;$n{$b=$_}=++$n;$n>$.?die:i($n)for@{$g{$b}};}/ /;$n=\$n{$`};$`eq$'&&next;push@{$g{$`}},$_=$';i$$n}{$_=join$\,sort{$n{$a}-$n{$b}}keys%n

Score: 164.53 (fail)

#!perl -pl
sub i{my($b,$n)=@_;($n{$b}=++$n)>$.&¨i($_,$n)for@{$g{$b}}}/ /;$n=$n{$`}=$n{$`};$`eq$'&&next;push@{$g{$`}},$';i($',$n)}{$_=join$\,sort{$n{$a}<=>$n{$b}}keys%n

Score: 183.52 (fail)

Look, no -pn!

#!perl -nl
sub i{my($b,$n)=@_;($n{$b}=++$n)>$.&¨for(@{$g{$b}}){i($_,$n)}}/ /;if($`eq$'){$n{$`}=0;next}push@{$g{$`}},$';i($',$n{$`}=$n{$`});END{print join"\n",sort{$n{$a}<=>$n{$b}}keys%n}