in reply to Re: Re: Re: Elegantly Selecting Every 3rd Element in an Array.
in thread Elegantly Selecting Every 3rd Element in an Array.
not ($_+1) % 3
Will always evaluate to false as it is the same as
(not ($_+1)) % 3
Adding some parens in the right places
not (($_+1) % 3)
Should give the correct result
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Elegantly Selecting Every 3rd Element in an Array.
by runrig (Abbot) on Sep 29, 2001 at 03:15 UTC | |
by tye (Sage) on Sep 29, 2001 at 03:26 UTC |