sort { ( $T{$a} ||= scalar @{[split m!/!,$a]} ) <=> ( $T{$b} ||= scalar @{[split m!/!,$b]} ) || $a cmp $b } @path