in reply to Re: Find duplicate digits
in thread Find duplicate digits
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.
|
|---|