#!~/perl5/perlbrew/perls/perl-5.28.1/bin/perl use Modern::Perl '2019'; use WWW::Scraper::ISBN; # instantiate the object my $scraper = WWW::Scraper::ISBN->new(); # load the drivers. requires that # WWW::Scraper::ISBN::LOC_Driver and # WWW::Scraper::ISBN::ISBNnu_Driver # be installed $scraper->drivers("LOC", "ISBNnu"); my @isbns = [ "9780134511184" ]; foreach my $num (@isbns) { $scraper->isbn($num); $scraper->search($scraper->isbn); if ($scraper->found) { my $b = $scraper->book; print "Title: ".$b->{'title'}."\n"; print "Author: ".$b->{'author'}."\n\n"; } else { print "Book: ".$scraper->isbn." not found.\n\n"; } }