in reply to When data structures differ from your expectations
in thread Dereferencing fetchall_arrayref({})

TomDLux, you are absolutely right. I usually don't post until I have exhausted all avenues. I had forgotten about Data::Dumper, and once run, it showed me what I now understand is a AoH. I'm still working on understanding references (even after reading the Llama book).

—Brad
"A little yeast leavens the whole dough."
  • Comment on Re: When data structures differ from your expectations

Replies are listed 'Best First'.
Re: Re: When data structures differ from your expectations
by TomDLux (Vicar) on Apr 26, 2004 at 16:01 UTC

    When I got into Perl, although I had a degree and many years of programming experience, it took me a long time to get used to complex data structures and references. I was used to C, where you have the structure declaration to refer to; since Perl can generate complex structures without any indication of what the arrangement will be, it can be hard to figure out.

    For the first six months, I mostly used data structures and references when I had to; the next six months I had to code-and-debug, a bit at a time, to figure out the appropriate code. By the end of the year, it had become part of me, I prefered passing a reference instead of a list, and then naturally stored that reference in an array or hash, and then stored a reference to that in ....

    Like all good things, data structures and references look like a long struggle when you're looking up at the learning curve, but it's definitely worth the effort.

    TomDLux

    --
    TTTATCGGTCGTTATATAGATGTTTGCA