http://www.perlmonks.org?node_id=1012687


in reply to Monitoring mysql tables in perl

Or you could add a field to the table you're monitoring which does the whole thing for you (column definition follows):
`last_modified` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAM +P