in reply to Re^8: Send password in Net::SSH::Expect
in thread Send password in Net::SSH::Expect

It is really the (important) part, yes. In full:
user@host:~/scripts$ ./key.pl Scalar value @hostname_check_arr[1] better written as $hostname_check_ +arr[1] at ./key.pl line 44. Scalar value @words[1] better written as $words[1] at ./key.pl line 50 +. Scalar value @key_check_arr[1] better written as $key_check_arr[1] at +./key.pl line 61. #ssh-rsa AAAAB3NzaC1yc root@EXBOLB4-NO1#gI" /tmp/test.txt']] at ./key. +pl line 70. OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for *
I have checked the variables and they seem to be fine, do you have any specific code in hand to clear them from that sort annoyance?

Replies are listed 'Best First'.
Re^10: Send password in Net::SSH::Expect
by hippo (Archbishop) on Jan 23, 2020 at 10:49 UTC
      Thanks, I found something:
      :HOSTA\x{0d}:
      Rest seems find. Working on removing this appendix.
        Bingo! That was it. Thanks, oh venerable monks! Removed it by adding:
        $hostname =~ s/\r//g;
        Now output shows:
        Launching [[ssh -q user@host 'sed -i "s#.*HOSTA#ssh-rsa AAAAB3NzaC1yc +root@HOSTA#gI" /tmp/test.txt']] at ./key.pl line 81.
        And the command is doing what it should. To learn is to struggle.