my $flop = 1; my @list = grep { $flop *= -1; $flop > 0 } split /\s+as\s+|\s*,\s+/, $string;