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

Re: New defined-match operator

Thread Previous | Thread Next
From:
Rocco Caputo
Date:
February 22, 2019 15:50
Subject:
Re: New defined-match operator
Message ID:
E08F0C6E-117A-4B97-9312-DAA92D695699@pobox.com
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>
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