1#!/usr/bin/perl -w 2 3use strict; 4use IMDb; 5 6my $search = shift @ARGV; 7 8my @ids = IMDb::search('title', $search); 9 10foreach my $id (@ids) 11{ 12 my $imdb = new IMDb 'title', $id 13 or die "can't create an IMDb object"; 14 15 printf "%s: %s (%d)\n", $id, $imdb->title, $imdb->year; 16} 17