develooper Front page | perl.perl5.porters | Postings from February 2013

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
Tom Christiansen
February 20, 2013 00:30
Re: Salvaging lexical $_ from deprecation
Message ID:
Rafael Garcia-Suarez <> wrote
   on Tue, 19 Feb 2013 22:27:00 +0100: 

> But the $<digit> variables are implicitly lexically scoped for a definition
> of scope that includes a last sight of a pattern match. In other contexts
> their behaviour is not guaranteed.

Eh?  No, they aren't.  Like most of the regex variables, the numbered variables
are dynamically scoped to scope enclosing that match.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About