Help for this page

Select Code to Download


  1. or download this
    foreach my $id (
        map { $_->[1] }
    ...
    {
        printf "$id\t$students{$id}\n";
    }
    
  2. or download this
    4873    Tom     2.9
    236     Fred    3.2
    1522    Susan   4.0
    
  3. or download this
        # Create a list of student IDs by taking the sorted
        # list of anonymous arrays and returning the second
    ...
        # the value of $students{$_} on the tab, and the second
        # element is the student ID.
        map { [ (split( "\t", $students{$_} ))[1], $_ ] } keys %students )