Re: "Secret" operators

Vladi Belperchinov-Shabanski <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Organization CSA
Message-ID <[email protected]>
On Wed, 2 Feb 2005 12:33:35 +1100 (EST)
Andrew Savige <[email protected]> wrote:

> Jos_ Castro wrote:
> > Apart from the "secret eskimo greeting" and the "goatse operator",
> > can anyone tell me about other "secret" operators?
> 
> Let's not forget the Ton Hospel "high-precedence decrement"
> operator ~- invented during a golf tournament (anyone remember
> which one?).
> 
> IIRC, Ton's ~- invention allows you to eliminate the parens in:
> 
>     $y = ($x-1)*4;
> 
> by using instead:
> 
>     $y = ~-$x*4;
> 
> saving a whopping two strokes. This trick should work on any
> twos complement machine -- and I'm not aware of any perl running
> on any non twos complement machine.

will not work if $x < 0

> 
> /-\
> 
> 
> Find local movie times and trailers on Yahoo! Movies.
> http://au.movies.yahoo.com
> 


-- 
Vladi Belperchinov-Shabanski <[email protected]> <[email protected]>
Personal home page at http://cade.datamax.bg/
DataMax SA   http://www.datamax.bg
there is still one truth on which we can depend
we've started something we can never end
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFCAOGVkBm4tG81shQRAkaTAKCRw7tN2WQoWT8/MXWJjmDPtNAjQACfSKxf
zsTeQpapJdUXkfZlI++nFTQ=
=rBRA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.