in reply to Net::SSH::Expect output
IMO, it should be your last resort when trying to automate any SSH work with Perl because it is not reliable.
Net::SSH2, Net::OpenSSH and Net::SSH::Perl are usually better alternatives.