From:

Date:

February 3, 2005 12:08Subject:

Re: "Secret" operatorsMessage ID:

20050203200739.GD3340@efn.orgOn Wed, Feb 02, 2005 at 04:20:05PM +0200, Vladi Belperchinov-Shabanski wrote: > On Wed, 2 Feb 2005 12:33:35 +1100 (EST) > Andrew Savige <ajsavige@yahoo.com.au> 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 Except under "use integer". A little known fact is that perl's bitops cast operands to unsigned integers without "use integer" and to signed integers with "use integer".Thread Previous | Thread Next

- "Secret" operators by José Castro
- RE: "Secret" operators by McGlinchy, Alistair
- RE: "Secret" operators by McGlinchy, Alistair
- Re: "Secret" operators by Yitzchak Scott-Thoennes
- Re: "Secret" operators by José Castro
- Re: "Secret" operators by Rafael Garcia-Suarez
- Re: "Secret" operators by Bart Lateur
- Re: "Secret" operators by Andrew Savige
- Re: "Secret" operators by krohn-list-perl
- Re: "Secret" operators by Quantum Mechanic
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by Quantum Mechanic
- Re: "Secret" operators by Sébastien Aperghis-Tramoni
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by Chris Dolan
- Re: "Secret" operators by Andrew Savige
- Re: "Secret" operators by Yanick Champoux
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by Eugene van der Pijll
- Re: "Secret" operators by merlyn
- Re: "Secret" operators by Andrew Savige
- Re: "Secret" operators by José Castro
- Re: "Secret" operators by Vladi Belperchinov-Shabanski
**Re: "Secret" operators**by Yitzchak Scott-Thoennes- Re: "Secret" operators by Peter Haworth
- Re: "Secret" operators by Jeff Yoak
- Re: "Secret" operators by José Castro
- Re: "Secret" operators by Vladi Belperchinov-Shabanski
- Re: "Secret" operators by Andy_Bach
- Re: "Secret" operators by Ronald J Kimball
- Re: "Secret" operators by Bernie Cosell
- Re: "Secret" operators by Yitzchak Scott-Thoennes
- Re: "Secret" operators by Quantum Mechanic
- Re: "Secret" operators by José Castro
- Re: "Secret" operators by Quantum Mechanic
- Re: "Secret" operators by José Castro
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by Georg Moritz
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by philippe.bruhat
- Re: "Secret" operators by Vladi Belperchinov-Shabanski
- Re: "Secret" operators by philippe.bruhat

nntp.perl.org: Perl Programming lists via nntp and http.

Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About