$ cat -e test.txt
Hello World$
$ cat test.txt | perl -pe "s/(.)/1 /g"| tr " " \n | sort | uniq | perl -pe "s/\n//g"
HWdelor
$ cat -e test.txt
Hello World$
$ cat test.txt | perl -pe "s/(.)/1 /g"| tr " " \n | sort | uniq | perl -pe "s/\n//g"
HWdelor