Help for this page
$pm->run_on_finish(sub { my ($pid, $exit_code, $ident) = @_; ... $ident, $pid, $exit_code; insert_into_db(\$dbh, $host, $action, $exit_code); });
for my $host (@hosts) { if (!$pm->start("cmd1 on $host")) { ... _exit($!); } }
for my $host (@hosts) { for ( ... _exit($!); } }