in reply to Perl won't Open() when called from Java

How do you determine it hangs in the open? What happens if you add a die statement right after your open?

I don't know what you are doing inside your while loop, but if you aren't printing enough so your buffer gets flushed, you won't see anything. And normally speaking, your while loop will never terminate; if you actually don't print to STDOUT from there, you will never see the output of your print statement.

Perhaps you should turn off buffering.

  • Comment on Re: Perl won't Open() when called from Java

Replies are listed 'Best First'.
Re^2: Perl won't Open() when called from Java
by Anonymous Monk on Feb 23, 2012 at 19:54 UTC
    Buffering was actually the problem. I assumed it was hanging but really it just wasn't showing any output for the print. Thanks. For others, this was solved by adding $|=1; to my code to disable buffering