use strict; use IO::Socket; use local::lib; print("Welcome to my webcrawler, \n Please specify a url in the following format : www.xxx.y \n"); chomp(my $yourURL=); my $sock = new IO::Socket::INET ( PeerAddr => $yourURL, PeerPort => '80', Proto => 'tcp', ); die "Could not create socket: $!\n" unless $sock; print ("TCP Connection Success. \n"); send($sock,"GET http:" . $yourURL . "HTTP/1.0\n\n",0); my @response=; print("@response");