return (); is the same as return;, which returns an empty list when the sub is called in list context and a false value when the sub is called in scalar context. On the other hand, return undef; always returns one value from the sub: undef. When that sub is called in list context, it returns a list consisting of one element (undef). Because that list has one element, when you evaluate it in boolean context, it's true! See also Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef.