use strict; use IO::Socket::INET; for (@ARGV){ s|http://||; m|([^/]+)(.*)|; my $s=IO::Socket::INET->new(PeerAddr=>$1,PeerPort=>80,Proto=>'tcp',Type=>SOCK_STREAM); print $s "GET ".($2||'/')." HTTP/1.0\nHost: $1 \n\n"; print "Link $_ is validated\n" if <$s>=~/200 OK/; close $s; }