in reply to Re: Spot the Bug
in thread Spot the Bug

For enlightenment, uncomment the code that you commented out one line at a time until the bug rears its ugly head.

Replies are listed 'Best First'.
Re^3: Spot the Bug
by pg (Canon) on Sep 09, 2005 at 02:08 UTC

    The other thing is that <STDIN>. It does not return in the normal way, which is expected base on the code, as line break has been reset to "\n.\n". But you can easily get around by entering "\n.\n" (<Enter>.<Enter>) to continue and inspect the next record.

    Any way, my first reply still reveals a bug, if the program is required to handle empty record.