$i is not a hostname. $i is a hostname followed by (at least) a newline. So, please try using chomp on the lines read from STDIN.
In reply to Re^3: scp command in perl introduces extra character while copying
by ikegami
in thread scp command in perl introduces extra character while copying
by surajsam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |