in reply to Sorting with multiple keys

[0] Perl> @toSort = split "\n", <<'END'; name=Document1.doc type=Word author=aAuthor name=Document1.doc type=Excel author=bAuthor name=Document1.doc type=Text author=cAuthor name=Document1.doc type=Excel author=dAuthor name=Document1.doc type=Word author=eAuthor END ;; Perl> print for map{ $_->[0] } sort{ $a->[1] cmp $b->[1] } map{ [ $_, join'', m[type=(\S+)\s+author=(\S+)] ] } @toSort;; name=Document1.doc type=Excel author=bAuthor name=Document1.doc type=Excel author=dAuthor name=Document1.doc type=Text author=cAuthor name=Document1.doc type=Word author=aAuthor name=Document1.doc type=Word author=eAuthor

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.