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.