Many thanks. Apologies for the late answer but I have been away of work a few hours.
in reply to Re: How I'm sure syswrite has finished?
in thread How I'm sure syswrite has finished?
I tried already your suggestion of trying to produce an acknowledge from the other side (the other side is a process running in a remote machine via SSH. It was started using IPC::Open2) didn't work well. May be I did s.t. wrong. As several people mentioned is difficult to give advice without the whole context, but I can post the two programs (local and remote) if you like.