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

Re: The sperm secret operator: is it new?

Thread Previous | Thread Next
From:
John Douglas Porter
Date:
March 14, 2012 07:48
Subject:
Re: The sperm secret operator: is it new?
Message ID:
1331736515.66544.YahooMailClassic@web161602.mail.bf1.yahoo.com

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?
-- 
jdporter


--- On Wed, 3/14/12, Philippe Bruhat (BooK) <philippe.bruhat@free.fr> wrote:

> From: Philippe Bruhat (BooK) <philippe.bruhat@free.fr>
> Subject: Re: The sperm secret operator: is it new?
> To: fwp@perl.org
> Date: Wednesday, March 14, 2012, 8:29 AM
> On Wed, Mar 14, 2012 at 12:36:10PM
> +0100, Philippe Bruhat (BooK) wrote:
> > Hi,
> > 
> > While doing some tests/research on secret operators, I
> stumbled upon this
> > one in my one-liners:
> > 
> >     ~~<>
> > 
> > Obviously, this should be named "the sperm operator".
> It's only useful
> > in list context. Just like sperm cells work better when
> there are many
> > of them. ;-)
> > 
> 
> Example usage:
> 
>    # the first three lines constitute the
> header
>    @header = ( ~~<>, ~~<>,
> ~~<> );
> 
> -- 
>  Philippe Bruhat (BooK)
> 
>  The only way to get a better government is to get better
> voters.
>                
>                
>    (Moral from Groo The Wanderer #109
> (Epic))
>

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