in reply to Re: Find duplicate digitsin thread Find duplicate digits
print grep { /(\d).*\1/ and eval "2 == tr/$1//" } map {sprintf "%04d +",$_} (0..9999) [download]
Cheers Rolf