Help for this page

Select Code to Download


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