Anyway, Doug Adams has some great AppleScripts available to find and/or delete these dupes, but they don't always work for me.
So, I wrote a Perl script (view source) to parse the "Song List" which can be exported from iTunes (in the File menu). There are 25 different "fields" associated with every track in the list, and the Perl script allows you to easily pick which fields you want (by editing the Perl script where documented).

