#!/usr/bin/perl BEGIN { push(@INC,"Barcode-ColonCat-0.02/blib/lib"); } use LWP::Simple; use Barcode::ColonCat; use strict; my $isbn; unless ($isbn = $ARGV[0]) { print "Enter barcode now:\n"; $isbn = ; my $type; ($isbn, $type) = Barcode::ColonCat::decode( $isbn ); die "$isbn doesn't seem to be an ISBN" unless $type eq "ISBN"; } print "HE: $isbn\n"; my $content = get( "http://www.amazon.com/exec/obidos/ASIN/" . $isbn ); $content =~ m{(.+?)
by (.+?)
}s; print "TITLE : $1\n"; print "AUTHOR: ", htmlfilter($2),"\n"; print "ISBN : $isbn\n\n"; sub htmlfilter { my $s = shift; $s =~ s{}{}g; return $s; }