in reply to Re^2: How would you handle arrays of arrays?
in thread How would you handle arrays of arrays?

As for the foreach getting too long, the following layout might be useful:
foreach ( @cfgA, @cfgB, #@cfgC, # not this time! @cfgD, @cfgE, #@cfgF, # not! @cfgG, # etc ) { }
But it might be easier to maintain the paths and files on your filesystem than in your script. I.e., create all the paths and files in your $local_dir; and just copy the desired paths; or perhaps tar up each configuration and untar the desired ones.