in reply to Net::OpenSSH::Parallel Options

Are you trying to add them in the Net::OpenSSH::Parallel constructor (my $pssh = Net::OpenSSH::Parallel->new()) call? If so, take a look at the section on the 'add_host' method--specifically, it says, "[A]ny additional option will be passed verbatim to the Net::OpenSSH constructor later." So I suspect the following *MIGHT* work (*UNTESTED*):

my $pssh = Net::OpenSSH::Parallel->new(); $pssh->add_host($_, master_stderr_discard => 1, master_stdout_discard => 1, ) for @hosts;

Hope that helps.

Replies are listed 'Best First'.
Re^2: Net::OpenSSH::Parallel Options
by rgren925 (Beadle) on Mar 25, 2022 at 22:40 UTC

    Wow! Thank you SO much! Don't know how I missed that. I guess that, since the options are passed on the constructor to Net::OpenSSH, I *assumed* (always a bad idea) that it would be the same here.

    It works great!