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

Re: Salvaging lexical $_ from deprecation

Thread Previous | Thread Next
From:
Lukas Mai
Date:
March 3, 2013 02:07
Subject:
Re: Salvaging lexical $_ from deprecation
Message ID:
5132B04B.4010309@web.de
On 27.02.2013 10:23, Dr.Ruud wrote:
> On 2013-02-26 16:59, Darin McBride wrote:
>
>> (I'd _almost_ argue for 'eq' and kin to accept the topic,
>> making the above "my @bar = any { eq 'a' } qw(a b c)", but that's too
>> far.)
>
> Implement it as _eq :)

sub _eq { $_ eq $_[0] }

... but of course that doesn't work with lexical $_.

-- 
Lukas Mai <l.mai@web.de>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About