... chomp (my @hosts = `cat ssh-list.txt`); #print "@hosts\n"; my (%ssh, %ls); for my $host (@hosts) { $ssh{$host} = Net::OpenSSH->new($host, user=> $user_name, password=> $password,master_stderr_discard => 1, async=>1, master_opts => [-o => "StrictHostKeyChecking no" ] ); } for my $host (@hosts) { chomp (my $user = $ssh{$host}->capture('egrep "^dba|^sea|^adm|^mwa|^ae" /etc/passwd'));