in reply to Re^2: Variable being clobbered by a seemingly unrelated while loop
in thread Variable being clobbered by a seemingly unrelated while loop

Right. No I was thinking $_ was implicitly localized in subs, but now I see perlsub explicitly warns against expecting this.