for ( my $ix = $#text; $ix >= 0; -- $ix ) { # same loop contents. }