in reply to Re^2: Flip-flop won't DWIMin thread Flip-flop won't DWIM
perl -lwe '$x = 0; print join " ", grep { scalar(!$x++../D/) } qw(A B + C D E F)' # prints: # A B C D [download]