in reply to Perl overwriting some lines

I'm surprised you're getting any output. You're first while loop iterates over the entire file, populating %starthash. By the time the second while is encountered, there's nothing more to read, so its body is not executed once. But that's where the print statement is.

Replies are listed 'Best First'.
Re^2: Perl overwriting some lines
by Anonymous Monk on Nov 17, 2009 at 15:19 UTC
    Hi. I apologize for this. I removed the close(input file) and again, open (input file) commands by mistake. I do do that, and that's not the real problem. Again, my apologies. Will be more careful.