His code assumes @a is empty, which means $#a returns -1, so he's doing
(...)[-1 - 2 .. -1] which is just
(...)[-3 .. -1]. Your case cannot be handled in a similar manner -- you'd need to know the size of the list being returned by split(). Your first approach is fine.