{ die unless my @stat = stat $the_file; my $seconds_until_one_hour_old = 3600 - (time - $stat[9]); last if $seconds_until_one_hour_old <= 0; # already old enough sleep $seconds_until_one_hour_old; # not yet redo; # and test again }