defined() should be fast enough that calling it even a million times is no big deal.foreach my $element (@sparse) { if ( defined $element ) { # YOUR CODE HERE # } }
In reply to Re: Re^2: Sparse arrays?
by paulbort
in thread Sparse arrays?
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |