Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
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 exploiting the Monastery: (15)
As of 2015-07-02 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls