in reply to how to remove similiar duplicate elements in a file/array

If you're on a UNIX system, you can use standard coreutils to achieve the job:
nl -s '|' with_dups.txt | sort -u -t '|' -k 9,13 | sort -n -b | cut -d + '|' -f 2- > no_dups.txt