Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: dereferencing multiple hash array structureby Athanasius (Archbishop) |
on Jun 23, 2012 at 03:40 UTC ( [id://977933]=note: print w/replies, xml ) | Need Help?? |
Here is an extract from the data structure in DoxyDocs1.pm, re-formatted for greater readability and with one => re-written as quote + comma (see Comma Operator in perlop):
As you can see, doc is a hash key with a reference to an anonymous array as its value. This array contains 3 elements: a reference to an anonymous hash; the string "params"; and a reference to an anonymous array. As GrandFather says, this is syntactically OK, but it is almost certainly not what was intended — which is why you’re unable to extract the data you want. You will need to re-consider the way this data structure is generated. Update: Using prototypes on subroutines is usually a bad idea, unless you have a strong reason to. Better to remove the trailing parentheses from the definition of sub GenerateClassInfo; then call it without the & prefix. HTH, Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|