Over a million developers have joined DZone.

Perl Crawler

DZone's Guide to

Perl Crawler

Free Resource
The following code is designed to print all the links found on the google home page.  I found it laying around in my old source-code folder, it may not be fully working.

use IO::Socket;

$socket = IO::Socket::INET->new(PeerAddr => 'google.com',
				PeerPort => 80,
				Proto => 'tcp',
				Type => SOCK_STREAM)
	or die "Couldn't connect";
print $socket "GET / HTTP/1.0\n\n";
#$page = <$socket>;
while (defined($line = <$socket>)) {
	$line =~ m{href="(.*?)"}ig;
	print "$1";

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}