Assuming you have one hostname per line in your file you need to add a chomp; after while (<FILE>) { to remove the newline at the end of the hostname.
In reply to Re: Need help with script with a while loop reading file
by hdb
in thread Need help with script with a while loop reading file
by brianjb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |