in reply to net::OpenSSH several commands, stdout are mixed up

That is because all of the $f_stdout values derived from the same SSH connection are the same handle. You will need a separate SSH channel for each individual traceping. Look at the "connection multiplexing" features in OpenSSH for more.

Edit: So Net::OpenSSH already implements multiplexing, so the problem is something else.

Replies are listed 'Best First'.
Re^2: net::OpenSSH several commands, stdout are mixed up
by salva (Canon) on Sep 17, 2020 at 06:32 UTC
    That is because all of the $f_stdout values derived from the same SSH connection are the same handle

    No, they are not. Every open3 call opens a new channel and returns a different set of pipes attached to the remote process stdin, stdout and stderr streams.