Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Need help with script with a while loop reading file

by hdb (Prior)
on May 03, 2013 at 13:56 UTC ( #1031895=note: print w/replies, xml ) Need Help??


in reply to Need help with script with a while loop reading file

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.

Replies are listed 'Best First'.
Re^2: Need help with script with a while loop reading file
by brianjb (Novice) on May 03, 2013 at 14:26 UTC
    Thank you very much! I indeed forgot the chomp....rookie mistake

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2016-09-25 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (463 votes). Check out past polls.