To not answer your question: Net::OpenSSH and Net::SSH2 are generally considered to be better options than Net::SSH::Perl (which is not being actively maintained, and has problems).
A better fit for code written to Net::SSH::Perl is Net::SSH2::Simple. This is mostly working for me, however, I have an indefinite loop on processing output under threads while (!$chan->eof()).