[~] $ perl -wnle'@w=split/\s+/,$_,31;pop@w;print join " ",@w' one two three four five one two three four