in reply to print statement changes results!

Update: see my explanation below.

Perhaps you are Suffering from Buffering

$| = 1;

Replies are listed 'Best First'.
Re^2: print statement changes results!
by chromatic (Archbishop) on Jun 06, 2011 at 18:05 UTC

    How would buffering affect this?

      It was just a stab in the dark. Clearly, since the OP's problem has been solved, buffering has nothing to do with it. The OP presented a snippet of code with no input data or output data, and, in my opinion, a vague description of a mysterious print-related issue. I took an educated guess that the OP maybe wasn't showing us more print statements.

      I figured maybe trying to flush might at least eliminate that as a possibility. I'm just trying to help. And I'm here to learn.

        I'm just trying to help.

        I understand that, and I appreciate that, and I don't mean to sound like I'm trying to chastise you.

        I was merely curious if you knew about something related to buffering that could affect things. I've never come across anything of the sort.