in reply to net::telnet problem

You my find Net::OpenSSH useful:
use Net::OpenSSH 0.16; my %ssh; $ssh{$_} = Net::OpenSSH->new($_, async => 1) for @hosts; my %log; open $log{$_}, '>', "/tmp/install-$_.log" for @hosts; my @pids = map $ssh{$_}->scp_put({stderr_fh => $log{$_}, stdout_fh => $log{$_}, async => 1}, $local_fn, $target), @hosts; waitpid($_, 0) for @pids; @pids = map $ssh{$_}->spawn({ stdout_fh => $log{$_}, stderr_fh => $log{$_} }, "remote command..."), @hosts; waitpid($_, 0) for @pids;