Help for this page

Select Code to Download


  1. or download this
    my %values = ( "apple"  => "1",
                   "pear"   => "3",
                   "orange" => "3",
                   "melon"  => "2",
                   "grape"  => "2");
    
  2. or download this
    Level 3:
    Pear, Orange
    ...
    
    Level 1:
    apple
    
  3. or download this
    my %hash = (
      1 => ["apple"], 2 => ["melon", "grape"],
    ...
    $hash{1}[1] = "pickle";
    
    print "Level $_\n@{$hash{$_}}\n\n" for reverse sort keys %hash;