Strangely, nobody yet seems to have taken up the issue of this line in friedo's code:
while(chomp( my $line = <NUMBERS> ) ) {Don't do this!!
Why? Because if, for example, the last line of the file does not end with a newline, your code will ignore it (in order to undertand why, type "perldoc -f chomp" at your command line).
For a more detailed discussion of this meme, see thread 303987, in particular the comments from ChemBoy and Abigail-II.
In reply to Re^2: Find duplicate digits
by Not_a_Number
in thread Find duplicate digits
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |