Book Searching with Perl The Starting Grid 5 of 29 : [PREV] [NEXT]

The Functionality

 use WWW::Scraper::ISBN;
 my $scraper = WWW::Scraper::ISBN->new();

 $scraper->drivers("Driver1", "Driver2");

 my $isbn = "123456789X";
 my $record = $scraper->search($isbn);

 if($record->found) {
       print "Book ".$record->isbn." found by driver ".$record->found_in."\n";
       my $book = $record->book;
       # do stuff with book hash
       print $book->{'title'};
       print $book->{'author'};
       # etc
 } else {
       print $book->error;
 }

© 2004 Barbie barbie@missbarbell.co.uk Home http://birmingham.pm.org/