On Wed, Jul 10, 2002 at 11:14:47AM +0200, Roland Giersig wrote:
> > Playing devil's advocate to myself, $1, $2, etc. are only readable
> > because
> > I'm familiar with them. $exp->matchlist could be argued to be much
> > more readable.
>
> Setting $1, $2, etc. is actually a good DWIM-idea, but does anybody has
> an idea how to circumvent the read-only attribute?
>
A guru I spoke with says they are effectively untouchable. I also
was wondering why they didn't show up with '-re'. Turns out they go out
of scope _fast_ after the pattern match - as soon as the current code
block ends, even from e.g. within if(){ }.
It may be possible from XS, but it would likely be ugly.
Austin
|