in reply to Send many file via socket

Why not taking advantage from existing modules such as Net::FTPServer for the server side or Net::FTP or its bunch of derived modules for the client side?

I see that Net::FTP::Simple has a method send_files() which allows you to give it a list of files to be FTP-ed in one bunch.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James