Sorting filenames by length of stringEdit
I say "filenames" but is really could be any string.
Motivating use case: figuring out where the cut-off point is for filepaths in a Git repo overflowing the maximum permitted length on a Windows file system (example CI failure here).
git ls-files | perl -e 'print sort { length($b) <=> length($a) } <>'
Via: Stack Overflow