my $hour = 1 / 24; while ( -M $myFile < $hour ) { sleep (10); } if ( -M $myFile > $hour ) { print "file has not been modified for more than 1 hr \n"; }