my $t = 1; grep { $t^=1 } LIST #### use 5.010; say grep { state $t = 1; $t ^= 1} ; # prints: bd