$ perl -le' use warnings; use strict; use 5.10.0; my $x = "a b c d e f g h"; my @set = split " ", ( split " ", $x, 4 )[ -1 ]; print "@set"; ' d e f g h