<=>

(thing) by Sverre Thu Mar 29 2001 at 12:07:28
In Perl, a comparison operator for numbers, similar to the string comparison operator 'cmp'.

<=> and cmp return:

These returns are the same as strcmp in C.

The <=> operand is known as the spaceship operator, for reasons that should be obvious if you have seen Star Wars.


In maths (esp. logic), "<=>" means double implication, an implication that goes both ways. In other words,

A <=> B

means the same as

A => B and B => A

"<=>" is often read as "if and only if".

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.