http://qs321.pair.com?node_id=11117273


in reply to Re^4: sendmail working for me but not another
in thread sendmail working for me but not another

For details, see open and fork functions to start.

That open syntax forks the process (which I had long forgotten); $mailprog is run in child process. A pipe is opened to $mailprog in order to write to its standard input by writing to $mailhandle. (If the pipe-open syntax were -|, then that would be to read standard output of the command.)