Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Best Data Structure for passing in multiple arguments to a sub-routineby philcrow (Priest) |
on Mar 13, 2007 at 15:45 UTC ( [id://604584]=note: print w/replies, xml ) | Need Help?? |
Since you care about the order you probably want a hash with keys for type, title, and elements which would hold an array reference of hashes which describe child elements. your parameter list (3. above) might also be an array.
Something like this:
In particular, I frequently use type coded sub hashes and if test on their types to control how the other args are treated. Phil
In Section
Seekers of Perl Wisdom
|
|