From: Avdi Grimm Date: 2012-06-28T05:57:49+09:00 Subject: Re: should $1 propagate through method calls? --20cf301e2e7d58922b04c37a773b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2012 at 4:36 PM, Ryan Davis wrote= : > The contents of successive groups matched in a successful pattern match. > In "cat" =3D~/(c|a)(t|z)/, $1 will be set to =93a=94 and $2 to =93t=94. T= HIS VARIABLE > IS LOCAL TO THE CURRENT SCOPE. [r/o, thread] > > Personally I love the Perl heritage stuff like this. But for someone coming from a non-Perl background, damn that must seem pretty weird and surprising= . -- Avdi --20cf301e2e7d58922b04c37a773b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2012 at 4:36 PM, Ryan Davis <ryand-ruby@zenspider= .com> wrote:
The contents of successive groups matched in a successful= pattern match. In "cat" =3D~/(c|a)(t|z)/, $1 will be set to =93a= =94 and $2 to =93t=94. THIS VARIABLE IS LOCAL TO THE CURRENT SCOPE. [r/o, t= hread]


Personally I love the Perl heritage st= uff like this. But for someone coming from a non-Perl background, damn that= must seem pretty weird and surprising.

--
Avdi=A0
--20cf301e2e7d58922b04c37a773b--