in reply to Re: For Loops and Reversing output
in thread For Loops and Reversing output

That should be for (my $i=$#sorted; $i>=0; $i--) (>=0, not >0), and it's the first thing mentioned in the first reply.