in reply to Re^2: why does typo work?
in thread why does typo work?

perlop: "If either operand of scalar ".." is a constant expression, that operand is considered true if it is equal ("==") to the current input line number (the $. variable"

Since the line number is never 0, it prints until the end of file. This is a bit too obsure, IMO, i'd do it like that:

if ( ($payperiod =~ /$start_day/) .. eof ) { ... }
(parens also added for clarity)