Posted on 2007-09-29 08:08:32-07 by s41nt in response to 6137
Re: Can't get directors functionality working
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; }
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.