If .. or ... in used scalar context, and one of the arguments is a numerical literal (as is the case here), there's an implicit comparison against $. is made. So, in the given examples, after matching the left hand side of ..., $. equals 1. So, before the right hand side is tested, $. equals 2. Hence, ...0 or ...1 will never match, but ...2 will.