in reply to Re^3: Short form (ternary) if else
in thread Short form (ternary) if else

This is the "spaceship" operator for comparing in a numeric sense:
#!/usr/bin/perl -w use strict; my $x = 2; my $y = 3; my $cmp_result = $x <=> $y; print $cmp_result # -1
Note: while naming variables the same as Perl key words is allowed (e.g. $cmp, (cmp is a key word), I personally try to avoid this).

for comparison in a string context, use cmp:

my $cmp_result = $stringX cmp $stringY;
Update: As to the history, I have no idea why <=> is called the "spaceship" operator, but that is the common usage.