in reply to Re^3: Find duplicate digits
in thread Find duplicate digits
$ indicates a command prompt (a shell, like bash/csh/cmd...)$ perl -MO=Deparse -le"%h=(), undef @h{split'',$_}, keys %h == 3 and + print for '0000'..'9999'" BEGIN { $/ = "\n"; $\ = "\n"; } ; (%h) = (), undef @h{split(//, $_, 0)}, keys %h == 3 and print $_ forea +ch ('0000' .. '9999'); -e syntax OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Find duplicate digits
by mroman (Initiate) on Apr 07, 2010 at 14:07 UTC |