open my $fh, '<', \<<EOF; reads the 'in-memory' file delimited by the EOF tokens at the top and bottom. I used this construct just to create the in-memory file instead of creating the file separately.

This feature became possible with perl version 5.08, I believe. If you're having problems, just open the file the way you do in your code - open (my $filelist_fh, '<', $list) or die "Cannot open $list $!"

My code just shows how to get the filename using 'fileparse' from the File::Basename module.

I just printed the new path/filename to illustrate how it works. You would use your copy here instead.

My example should be all you need to do your task. I printed the new path/filename but all you need to do is copy instead of print. Here is the documentation for File::Basename (which is part of the core installation).

See how I used fileparse to get the filename (absent the path) from the original path/filename and then made the new path/filename. This is illustrated in the printout I provided.