I'm aware of how to get the last argument passed to a function but I'm wondering how to get all the arguments of a function after the first two:
For instance:
function custom_scp(){
    PORT=$1
    USER=$2
    SOURCES=`ALL_OTHER_ARGS`
    scp -P $PORT -r $SOURCES $USER@myserver.com:~/
}
So sending three files to the  remote home directory would look like 
$ custom_scp 8001 me ./env.py ./test.py ./haha.py
 
     
    