in reply to Re^4: unless versus if ( ! ) inside a subroutine
in thread unless versus if ( ! ) inside a subroutine

Sure, but in those cases, constants are being tested in the conditional, which allows the compiler to make optimisations. In the OP's example, though, $v is a regular (mutable) scalar variable, which could change its value at runtime (after the compiler has done its work)...