Help for this page

Select Code to Download


  1. or download this
    $index < $#array + 1
    
  2. or download this
    my @array = (1 .. 9);
    while (@array) {
        my $last = pop @array;
        print "$last\n";
    }
    
  3. or download this
    my @array = reverse (1 .. 9);
    print "$_\n" for @array;
    ...
    for (my $index = $#array; $index >=0; $index--) {
        print $array[$index], "\n";
    }