Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    my @sorted_names = sort { $hash{$b} <=> $hash{$a} } keys %hash;
    print $hash{$_},' ',$_,$/ for @sorted_names;
    
  2. or download this
    foreach (@names_marks) {
      ($names[$_], $marks[$_]) = split / /, $_;
      $hash{"$marks[$_]".$names[$_]} = ucfirst($names[$_]). " " . $marks[$
    +_];
    }