in reply to Re^2: Paranormal leakage of previous value from conditionally set lexical variable
in thread Paranormal leakage of previous value from conditionally set lexical variable

This won't help in your case, but fwiw, Perl::Critic catches this.

  • Comment on Re^3: Paranormal leakage of previous value from conditionally set lexical variable