in reply to Differing Behavior as CGI vs. Command Line

Have you consider if the the file you have "written" to the file system has in fact been fully written before you begin to read from it? Are you using the same file handle (you may not want to do that...). In many cases file IO is asynchronous.

I realize that this isn't an explaination of why CGI differs from cmd line execution, but that could be highlighting a bug in your code.

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

  • Comment on Re: Differing Behavior as CGI vs. Command Line