in reply to Upload Multiple Files

There are so many things wrong with this, it is difficult to know where to start.

First, put <code> </code> blocks around your code so it will be easier for others to help you.

When you are developing a script, always

use warnings; use strict;

They will save you a lot of aggravation in the long run. You can comment them out after the script is finished, but during development, let the computer give you all the help it can.

Look into using the File::Basename module instead of regexes for getting the base file name.

You probably will want to use the $cgi->upload() function to handle the uploads.

If the FILELIST file is remote, (on the users hard drive as opposed to the servers,) you are going to have to upload that first before you can use it.

There are several places where you have two variables, equal to each other, where you perform the same transform operations on each. Useless added complexity.

In the output, you output a header with $cgi->header(), but then print out some more header elements, then the "text" of the page then open the BODY (twice!!) and close it again immediately.

I think you should work on writing a script that will upload ONE file, get it working reliably, and then work on expanding it to handle multiple files. I would also highly recommend reading the docs for the CGI module. Several times.