Help for this page

Select Code to Download


  1. or download this
    my $count = 0;
    for ( sort { $a cmp $b } keys %hash ) {
      print "$_ => $hash{$_}\n"
        if $count++ < 10;
    }
    
  2. or download this
    my $count = 0;
    for ( sort { $hash{$a} cmp $hash{$b} } keys %hash ) {
      print "$_ => $hash{$_}\n"
        if $count++ < 10;
    }