yes, that would work, but it would mean having to change the $from for eac directory. Could i have list of directories and pipe that list into the script?
Comment on Re^2: copy large number files in different dir's
The only thing you would need to change is the @paths = () list of directories in the script, not the loop which grabs $from, $to pairs from that list. You could acquire the @paths list from anywhere that provides a list: slurp a file, read from STDIN, etc.