my ($key, @array[0,1], undef, $value) = split " ", $string; #### my ($key, @array[0,1], undef, $value) = split " ", $string, 6; # Split five times, ignore the sixth value #### my ($key, $value) = (split(" ", $string, -1))[0,6];