print "@$_" for sort{ my ($o, $i) = (0,0); $i++ until ( $i < @$a or $i < @$b ) and $o=( $a->[$i] cmp $b->[$i] ); $o || @$a <=> @$b; }@deps;