#!/usr/bin/perl -w use strict; my $x = 2; my $y = 3; my $cmp_result = $x <=> $y; print $cmp_result # -1 #### my $cmp_result = $stringX cmp $stringY;