P
Paul Lalli
for my $i (reverse (1..20)){
do_stuff_with($i);
}
This, of course, assumes that:
* 20 is a small number[1] because the optomisation of .. in for()
does not cope with reverse().
* do_stuff_with() does not alter its arguments. If it did I'd still
not use a C-style for, I'd use a while().
[1] er, 20 _is_ a small number but you know what I mean.
I never claimed that this was a *good* way of doing it. I merely
commented that for ($i=20; $i>0; $i--) {} could be written without using
the C-style for loop.
Paul Lalli