in reply to Best Data Structure for passing in multiple arguments to a sub-routine

To make it easier to read and to maintain (I presume this is going to be some sort of template), it may be easiest to represent the data in YAML (YAML::Syck for speed). For some elements, you may need hashes, for others array - writing it down in YAML notation makes it easy to adjust your data structure to suit the need.

For instance, you could represent your example as follows:

slides: - no: 1 type: ppBLAHBLAH title: My title elements: - type: picture path: /my/path width: 100 height: 50 - type: text box text: | A bunch of flowing text style: italics
  • Comment on Re: Best Data Structure for passing in multiple arguments to a sub-routine
  • Download Code