I've posted something similar previously on this site with the node
Scripted Actions upon Page Changes which may additionally be of interest (albeit it is somewhat dated now). This code differs in that it employs the last-modified-header or, where this is unavailable, a message digest of the page, in order to determine page changes.
perl -le "print unpack'N', pack'B32', '00000000000000000000001011100100'"