in reply to remove duplicates with hash and grep
Also if I print after I declare $domain I do get the list of domains, so I know the data is there.