in reply to Re: multiple layers of referencing and dereferencing
in thread multiple layers of referencing and dereferencing

I responded to "not too bad" in an earlier reply.

Thank you for the suggestions and sample code. I'm printing it and thinking about how I can reorganize my approach to my actual task to take advantage of these "better ways". I like the much cleaner look of it, but I'm going to need a little time to "see the light" for my application.

Thank you
  • Comment on Re^2: multiple layers of referencing and dereferencing

Replies are listed 'Best First'.
Re^3: multiple layers of referencing and dereferencing
by Marshall (Canon) on Jun 26, 2009 at 23:48 UTC
    Perl has amazing capabilities to generate very complex multi-dimensional data structures. In Perl every dimension until the last one is a reference. Seldom will more than 3 dimensions be needed with the power of the built in data type of hash table especially when combined with Regex. In my example, instead of making a sub-struct with the "data", I just filtered the hash keys to get the "data" keys (data,data1,data3) instead of other keys. This "flattens" the code and reduces one level in the data structure (and very efficiently).

    I looks like to me that you just need a hash table with some heterogeneous values, like pointer to array, scalar, etc. This single structure is then represented in an amalgamation as an array them (pointers, "references" to them).