in reply to Multithreaded processing of a CSV file

Your problem of resolving domain names has nothing to do with the fact that you read your data from a CSV file, consider editing the title of your posting.

I think the usual approach is to create a limited number of worker threads and make each of the workers resolve one domain at a time. The main thread tells the worker threads which domain to resolve next.

Do you know Parallel::ForkManager? It uses separate processes instead of threads, but the examples in the documentation look promising for your problem.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re: Multithreaded processing of a CSV file