my @res = grep $_ split(",", "a,b,c,d,,f,,h"); #is a syntax error. #### my @res = grep $_, split(",", "a,b,c,d,,f,,h");