in reply to Forking Issue

You should add plain old print statements in there. Data::Dumper is handy too.

Make sure the pipe is created successfully.
Make sure that the program is actually reaching both branches.
See what it wants to print into the pipe.
See what if anything it gets out. Keep in mind that it will want to slurp the whole pipe with that read.
And make sure you're not suffering from buffering!

Replies are listed 'Best First'.
Re^2: Forking Issue
by nwboy74 (Novice) on Oct 20, 2010 at 20:12 UTC

    I had print statements in there. That's how I know it's getting to the write line. I've printed out $content and it's just normal old text. I can write other text into the pipe and it works. Only when I try to write $content does it hang.