develooper Front page | perl.fwp | Postings from March 2012

Re: The sperm secret operator: is it new?

Thread Previous | Thread Next
From:
Sebastian Schmidt
Date:
March 14, 2012 07:51
Subject:
Re: The sperm secret operator: is it new?
Message ID:
20120314145109.GA3560@erwin.lan.yath.de
On Wed, Mar 14, 2012 at 07:48:35AM -0700, John Douglas Porter wrote:
[ ~~ vs. scalar ]
> 
> So is that the Perl 6 smart match operator? or something else?
> In any case... How does it work here?  It looks like it's functionally
> equivalent to scalar()... but why?

It's twice bitwise not, and bitwise not enforces scalar context.
Think ~(~(foo)).

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