Since no value is explicitly returned from f, and no expressions are evaluated inside it, shouldn't the result be undef?
Nope. perldoc perlsub says the return value is unspecified:
If no return is found and if the last statement is an expression, its value is returned. If the last statement is a loop control structure like a foreach or a while, the returned value is unspecified.
"Unspecified" is short for "we're not going to document the exact behavior because we could change it at any time and you shouldn't rely on it." Right now, it returns PL_no as LeoNerd explained; in a future Perl version, it could return undef, or something else altogether.