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
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 pondering the Monastery: (8)
As of 2014-12-20 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls