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

Re: New defined-match operator

Thread Previous | Thread Next
From:
David Nicol
Date:
February 22, 2019 16:27
Subject:
Re: New defined-match operator
Message ID:
CAFwScO-pStxPFSWgNAJzz9B2_0wX96XJz1zti7iLuJ-fARw=Gg@mail.gmail.com
what happens when it gets used twice in the same expression? Nothing else
that aliases the topic uses expression scope (allowing of course that
postfix for implies a block to its left) (and a list to the right) (put
your ands on your hips)

/me is abruptly returned to transylvania via transit beam

On Fri, Feb 22, 2019 at 9:50 AM Rocco Caputo <rcaputo@pobox.com> wrote:

> If there was a defined()-alike that set $_ for the rest of the expression:
>
>   $foo = 'bar';
>   $_ = 'abc';
>   if ( defined2($foo) && /bar/ && say ) {
>     say $_;
>   }
>
> Would print:
>
>   bar
>   abc
>
> --
> Rocco Caputo <rcaputo@pobox.com>
>


-- 
"I don't know about that, as it is outside of my area of expertise." --
competent specialized practitioners, all the time

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