Anagrams

Score: 107.36 (pass)

#!perl -l
chop,push@{$g{join"",sort/./g}},$_ for sort<>;$#$_&&print"@$_"for sort{@$a<=>@$b||"@$a"cmp"@$b"}values%g