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

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
Jan Dubois
February 20, 2013 07:00
Re: Salvaging lexical $_ from deprecation
Message ID:
On Tue, Feb 19, 2013 at 10:42 PM, Rafael Garcia-Suarez
<> wrote:
> What I'm
> certain of, is that having a global $_ introduces action-at-distance
> bugs -- some of which requiring being worked around by such ugly
> constructs as "local *_" or just avoiding $_ entirely.

Note that since 5.14.0 you can always use "local $_".  It is now
special-cased to just assign a new value, and won't carry over any
magic the old value may have attached to it.


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