Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by NetWallah (Abbot)
on May 03, 2013 at 14:54 UTC ( #1031907=note: print w/replies, xml ) Need Help??


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

Move the line
my $res = Net::DNS::Resolver->new( ...
outside the "while (<FILE>)" loop - It does not need to be created for each record.

             "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
        -- Dr. Cox, Scrubs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031907]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2016-12-10 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (160 votes). Check out past polls.