in reply to Re: print problem
in thread print problem

The reason you need to set $| is explained in "perldoc perlvar"...
    $|    If set to nonzero, forces a flush right away and
          after every write or print on the currently
          selected output channel.  Default is 0
          ...
          STDOUT will typically be line buffered if output
          is to the terminal and block buffered otherwise.
          ...
So in your orriginal program, the buffer was just building up because it never say a line termination. (and when you switched to "\n" it did).