#!/usr/bin/perl -w $|++; my( $a, $b ) = 0; { $b = ( stat "foo" )[ 9 ]; if ( $a != $b ){ print scalar localtime, ": $b"; $a = $b } sleep 1; redo }