Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    foreach(sort {$a->{x} <=> $b->{x} or $a->{y} <=> $b->{y}} @a){
      print " $_->{x}  $_->{y}\n";
    }
    
  2. or download this
    $ ./sort.pl 
     1  1
    ...
     2  1
     2  2
     2  3