in reply to Net::SSH::Expect output

Is there any reason forcing you to use Net::SSH::Expect?

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.