Algorithm-SixDegrees
view release on metacpan or search on metacpan
samples/movie.pl view on Meta::CPAN
print "No match for '$actor'. Did you mean:\n";
foreach my $result (@{$results}) {
print "\t'", $result->[0], "' (career: " . $result->[1];
print '-' . $result->[2] if ($result->[1] != $result->[2]);
print ")\n";
};
exit(0);
}
=head1 MAKING A DATA SOURCE
A sample data source is at L<ftp://ftp.funet.fi/pub/mirrors/ftp.imdb.com/pub/>
I grabbed the F<actors.list.gz> and the F<actresses.list.gz> files from there.
I created a MySQL database table and some indexes:
create database movact;
grant all privileges on movact.* to movact identified by 'movact';
use movact;
create table movact ( actor varchar(128), movie varchar(128), year int );
( run in 3.283 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )