my $now = time; my $today = $now - ($now % 86400); while () { # read bank holiday file ... next if $bh_start < $today; # history ... } ...