Vary -N=nn to suit your bandwidth:

#! perl -slw use strict; use threads; use Thread::Queue; use LWP::Simple; our $N ||= 10; my $Q = new Thread::Queue; my @pool = map async{ print "$_ :", head( $_ ) ? 'ok' : 'not ok' while $_ = $Q->dequeue; }, 1 .. $N; while( <> ) { chomp; $Q->enqueue( $_ ); } $Q->enqueue( (undef) x $N ); $_->join for @pool; __END__ C:\test>headUrls.pl -N=20 urls.txt http://www.shops-gifts.shopiwon.com/ :not ok http://1ezbiz.leadsomatic.com :ok http://Indserve.com/kids :not ok http://16066.profitmatic.com :ok http://1-family.com/office/web/tp514/Boats.shtml :ok http://1mboard.proboards28.com/index.cgi :ok http://1plus-longdistance.com/domain/ :ok http://1stopsquare.com/101xyron.html :ok http://1world.leadsomatic.com :ok http://1stphoenix.veretekk.com/index.html :ok http://1stphoenix.veretekk.com :ok http://1bernard.veremail.com/index.html :ok

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: Question: Fast way to validate 600K websites by BrowserUk
in thread Question: Fast way to validate 600K websites by lihao

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.