sub step { my $step = shift; @_ [map {$_ * $step} 0 .. $#_ / $step]; }
No grep needed. This should be more efficient with large step sizes.
Abigail
In reply to Re: Stepping through an array
by Abigail-II
in thread Stepping through an array
by rob_au
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |