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

Very nice, but all in all I have 16 arrays now, might make the foreach loop long and hard to read.

I do like the data entries in the arrays though, I hadn't really used File module like that, but having each one as a single directory path would make it easier to read.
  • Comment on Re^2: How would you handle arrays of arrays?

Replies are listed 'Best First'.
Re^3: How would you handle arrays of arrays?
by hbm (Hermit) on Jan 09, 2009 at 19:23 UTC
    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.