in reply to Re: the '..' operator and decreasing values
in thread the '..' operator and decreasing values
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.
|
|---|