$ perl -E ' my @x = qw{a,b,c d,e,f g,h,i}; my @y; push @y, (split /,/)[1] for @x; say for @y; ' b e h