in reply to Skipping Elements in an Array

how about this?
for (0..$#Array){ next if length $Array[$_] == $num_of_skip; print "$Array[$_]\n"; # do some other cool stuff }

Replies are listed 'Best First'.
Re^2: Skipping Elements in an Array
by monkfan (Curate) on Apr 07, 2005 at 08:39 UTC
    Hi Taumarill,

    Thanks for the reply. But:

    1. In your snippet each element is "still evaluated", the intention is "not" to evaluate skipped element.

    2. Length of array element may or "may not" be equal to $num_of_skip.
    Regards,
    Edward