You might prefer
for ( my $i = 10; $i--; ) { # do something }
I regularly walk array indexes backwards, as you can shave a few cycles off of the standard
for ( my $i = 0; $i < $array_size; $i++ ) { # whatever }
logic that people love using in those languages that don't have a 'foreach' command.
In reply to Re^2: the '..' operator and decreasing values
by jhourcle
in thread the '..' operator and decreasing values
by eXile
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |