From: Martin DeMello Date: 2002-12-01T07:00:16+09:00 Subject: Re: Scope of regex match $variables Paul Melis wrote: > "Martin DeMello" wrote in message > news:NX3G9.135966$ka.3103955@news1.calgary.shaw.ca... >> Yeah, but I can't figure out a way to make them local to the calling >> scope, the way an actual Regexp#match call would. > > Why not simply return the MatchData object from your function? I do, but I thought it'd be nice to have the $n variables set as well. I suppose one *shouldn't* be allowed to implicitly set variables in the calling scope, though, now that I think about it. martin