According to the docs:
The FTP protocol allows files to be sent to or fetched from the server. Each transfer involves a local file (on the client) and a remote file (on the server). In this module, the same file name will be used for both local and remote if only one is specified. This means that transferring remote file /path/to/file will try to put that file in /path/to/file locally, unless you specify a local file name.
Update:
After taking a closer look at the docs, I found:
get ( REMOTE_FILE [, LOCAL_FILE
, WHERE] )
Get REMOTE_FILE from the server and store locally. LOCAL_FILE may be a filename or a filehandle. If not specified, the file will be stored in the current directory with the same leafname as the remote file.
If WHERE is given then the first WHERE bytes of the file will not be transfered, and the remaining bytes will be appended to the local file if it already exists.
Returns LOCAL_FILE, or the generated local file name if LOCAL_FILE is not given. If an error was encountered undef is returned.
put ( LOCAL_FILE
, REMOTE_FILE )
Put a file on the remote server. LOCAL_FILE may be a name or a filehandle. If LOCAL_FILE is a filehandle then REMOTE_FILE must be specified. If REMOTE_FILE is not specified then the file will be stored in the current directory with the same leafname as LOCAL_FILE.
Returns REMOTE_FILE, or the generated remote filename if REMOTE_FILE is not given.
NOTE: If for some reason the transfer does not complete and an error is returned then the contents that had been transfered will not be remove automatically.