1

Perl/C Comparison Errors

view story
linux-howto

http://ubuntuforums.org – Hello everyone, I wrote a C program to produce an output file which is 29,800 lines long which looks like: Code:   20.0 27   20.1 27   20.2 27   20.3 27   20.4 27 ... 3000.1 10 3000.2 10 3000.3 10 3000.4 10 3000.5 10 29,800 is the correct number of lines. However, (3000.5-20.0)*10 = 29805. That is, there are five skips in the program. It should end at 3000.0 but it contines beyond. I wrote a Perl program to find the skipped lines: Code: #!/usr/bin/perl use strict; use warnings; open (FH,"<tmp") or die "tmp: $!&qu (Hardware)