http://www.perlmonks.org?node_id=1034702


in reply to Re^2: Running PERL SCRIPTS in Parallel
in thread Running PERL SCRIPTS in Parallel

I have corrected the code.
my @pids = map $ssh->spawn(@$_), @cmds;
is equivalent to ...
my @pids; for my $cmd (@cmds) { push @pids, $ssh->spawn(@$cmd); }
It uses the Net::OpenSSH object passed to the sub to start all the commands in parallel.