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