Help for this page

Select Code to Download


  1. or download this
    #corrected code from first replies
    my @inner1 = (0, 1, 2);
    ...
    my @array2 = (\@inner1, \@inner2, \@inner3, \@inner4);
    
    my %hash = ('array1', \@array1, 'array2', \@array2);
    
  2. or download this
    (6, 7, 9)
    (2, 5, 8)
    (1, 4, 7)
    (0, 1, 2)
    
  3. or download this
    foreach my $i (sort { $hash{array1}[$b][1] <=> $hash{array1}[$a][1] } 
    +@{$hash{array1}}) {
    
    print @$i[1], "\n";
    
    }