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

Re: The sperm secret operator: is it new?

Thread Previous | Thread Next
From:
Andrew Savige
Date:
March 14, 2012 13:46
Subject:
Re: The sperm secret operator: is it new?
Message ID:
1331757994.53881.YahooMailNeo@web125506.mail.ne1.yahoo.com
> [ ~~ vs. scalar ]

The ~~ secret operator is old hat, good ol' inchworm:

 http://www.catonmat.net/blog/secret-perl-operators/#inchworm

BooK's innovation is to add <> and <>+0 to the end of it.

BTW, in addition to inchworm-on-a-stick ~- to subtract one,
I often use the converse -~ to add one (though only in Ruby
and Python, not usually Perl). For example, -~1 produces 2

in Ruby and Python, but -4,294,967,294 in Perl.


/-\

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