Dave Mitchell <davem <at> iabyn.com> writes: >>But at present $1 exists in a strange halfway house where it is neither >>truly global nor truly local. You are right to note that $. and other punctuation variables have the same behaviour. I suggested that $1 should be 'localized properly' but you noted that this might involve quite a performance penalty for every regexp match. A simpler answer, I suggest, is that when variables like $1 and $. are passed as arguments to subroutines, a copy be made in a read-only temporary scalar. That would get rid of these perennial bug reports or surprises. How about it? -- Ed Avis <eda@waniasset.com>Thread Previous | Thread Next