Finding all file types in a directory

Ran across this cool stackoverflow post that describes how to find all of the file types that exist in a directory:

find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u