http://www.perlmonks.org?node_id=423184


in reply to Re: Odd behaviour from print statement
in thread Odd behaviour from print statement

It is a pretty short script. The rest of the program is housekeeping, parsing the command line and configuration files, preparing the SQL statement, that sort of thing.

The debugger shows everything is OK.
When stepping through the loop, it will retrieve and process all the records it is supposed to even though it only prints the first one to file.
The variable $obtstr contains each record and is correctly formatted after the join without unexpected characters.

PJ
use strict; use warnings; use diagnostics;

Replies are listed 'Best First'.
Re^3: Odd behaviour from print statement
by talexb (Chancellor) on Jan 18, 2005 at 21:31 UTC

    So it runs correctly in the debugger, but not from the command line?

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      No, it produces the same results in the debugger as on the command line. It's just that the debugger doesn't show any unexpected or unusual conditions. All the variables are what they should be. All the return codes are good and so on. The print statement just doesn't seem to work. Actually I suspect disk buffering in some way since it works to STDOUT although I have no idea what the problem might be.

      PJ
      use strict; use warnings; use diagnostics;