|
My code got truncated - here's a cut down version
#!/usr/bin/perl -w
use strict;
use warnings;
use WWW::Yahoo::Movies;
my $title = shift || 'The Talented Mr Ripley';
my $matched = get_movie_info($title, 1);
for(@$matched) {
print "\nGet [$_->{title}] ...\n";
get_movie_info($_->{id});
}
sub get_movie_info {
my $title = shift;
my $ret_match = shift || 0;
my $ym = new WWW::Yahoo::Movies(id => $title);
my $directors = $ym->directors();
for(@$directors) {
print "$_->[0]: $_->[1]\n";
}
return $ym->matched if $ret_match;
}
|