in reply to Re^2: Paranormal leakage of previous value from conditionally set lexical variablein thread Paranormal leakage of previous value from conditionally set lexical variable
This won't help in your case, but fwiw, Perl::Critic catches this.