# Get the MD5 fingerprint of the file. open(IMAGE, "<$imagedir/$imagename") || die "Can't open $imagedir/$imagename\n"; $context = new MD5; $context->MD5::reset(); $context->MD5::add(); $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, "MD5::reset(); $context->MD5::add(); $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* }