Does anyone have a nice, concise syntax for looping over "the first N elements of an array, without vivification"?
use List::Util qw(min); for my $value (@a[0 ... min($#a, $N)]) { }
In reply to Re: Avoiding vivification with array slice
by moritz
in thread Avoiding vivification with array slice
by jbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |