I agree with the diagnoses, but I tend to use
IPC::Open3 or
IPC::Run3 to write to and read back from spawned processes. Actually I only use Open3 because it's core; otherwise where that isn't an issue I'd just use IPC::Run3 more often instead.
__________________________________________________________________________________
^M Free your mind!