Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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.


Comment on Re: Need help with script with a while loop reading file
Select or Download Code
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 contemplating the Monastery: (13)
As of 2015-08-03 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (49 votes), past polls