in reply to newbie quest for Image::Grab

hola, i'd highly recommend that you check out

http://mah.everybody.org/hacks/perl/getcomics.txt,

(core by Mark Hershberger, adapted by J.Stoffel)

a spritely wee script which downloads images intelligently; it is almost directly applicable to your problem of finding new images.

the business end of how it determines newness is in the following snippet, which could pretty much directly be copied & pasted to achieve what you want. rc is the request obtained from a lwp::useragent
# Get the MD5 fingerprint of the file. open(IMAGE, "<$imagedir/$imagename") || die "Can't open $imagedir/$ima +gename\n"; $context = new MD5; $context->MD5::reset(); $context->MD5::add(<IMAGE>); $filehash = $context->hexdigest(); close(IMAGE); # Get the MD5 fingerprint of the new picture open(TEMP, ">/tmp/getcomics.$$") || die "Can't open tempfile\n"; print TEMP $rc->content(); close(TEMP); open(TEMP, "</tmp/getcomics.$$") || die "Can't open tempfile\n"; $context->MD5::reset(); $context->MD5::add(<TEMP>); $newhash = $context->hexdigest(); close(TEMP); unlink "/tmp/getcomics.$$"; # See if the old info is different from the new. if( $newhash ne $filehash ) { # strut your funky stuff *here* }
hope that helps,

...wufnik

-- in the world of the mules there are no rules --