perl -MLWP::Simple -lne' my $ret = head("http://$_"); if (not $ret) { print "NOT\t$_" } else { print "OK\t$_"; } ' list.dat | tee results.txt