I've just spent over 2 hours trying to solve this for aFor tcsh script and my solution turned out to be pretty simple...:
set X = `echo $* | awk -F " " '{print $NF}'`
somecommand "$X"
I'm quite sure this would be a portable solution, but I'm not that experienced with scripting yet..except for the assignment.
Hope it helps someone anyway,
Vince