When applying (@@) a function to a list of potential arguments, how can Slot be used to take the last argument?

As you already observed, Slot[-1] is not valid syntax in the same way as Slot[1]. The only way I can think of to do what you want, is to catch all arguments in a list with SlotSequence and then take the last Part:

{##}[[-1]] & @@ Range[5]

5

However, for stuff like this, I'd recommend using Associations instead, since then you can index by name instead of by integer positions and it's much easier to skip parts of the data:

people = {
   <|"FirstName" -> "John", "LastName" -> "Doe", "DoB" -> Yesterday, "Country" -> "Somewhere"|>
};
{StringRiffle[{#FirstName, #LastName}], #Country} & /@ people

{{"John Doe", "Somewhere"}}

It makes it easier to understand the code as well.


people = {
   {firstName1, lastName1, dateOfBirth1, occupation1, country1},
   {firstName2, lastName2, , occupation2, country2}, 
   {firstName3, lastName3, dateOfBirth3, , country3}};

{StringRiffle[#[[1 ;; 2]]], #[[-1]]} & /@ people

(* {{"firstName1 lastName1", country1}, {"firstName2 lastName2", 
  country2}, {"firstName3 lastName3", country3}} *)

I recommend using the operator form of Replace for these tasks, because in those circumstances you can use patterns and give parts of the sequence names. If you must use the @@, you can compose with List:

List /* Replace[{firstName_, lastName_, ___, country_} :>
    {StringRiffle[{firstName, lastName}], country}] @@ 
 {"John", "Doe", "random", "dumb", "stuff", "Burkina Faso"}
(* {"John Doe", "Burkina Faso"} *)