in reply to search position is getting reset after 'local'

It's a known bug in Perl -- nearly four years old. But your post makes no sense to me. The variable CAN be used outside the block; what can't be used (or more specifically, what has lost its value) is the internal position in the string held by the variable.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
  • Comment on Re: search position is getting reset after 'local'