perl -e '@x=(qw(a b c d e f g)); push @y, @x[2..3]; print "@y\n"' c d