in reply to Re: Brain muchly befuddled by nested hashes
in thread Brain muchly befuddled by nested hashes


To All who have contributed:
*THE* 'aah-hhaa' moment is gathering steam in the hinterlands of my brain
and I expect to encounter it soon.

I believe my basic problem (area of misunderstanding) is that I am conflating
Perl's keys and values for hashes with how I would work with (program/manipulate)
datafields/sets/databases in another environment.  Perl's hashes, I perceive, are
a slightly different animal than what I have used in the past.

For now though, THANK YOU, for:
ysth:   Variables don't interpolate in single quotes.
        setting $Data::Dumper::Useqq=1 when examining your data

graff:   Something like simple concatenation or string interpolation would be clearer
        ($hash{'string'.$num} or $hash{"string$num"}). (ME: You share in the comment below
        to -johngg- with regard to 'interpolation')

ptoulis: noted before, {[ME: but still having trouble with the 'fat comma' and its' documentation)

Cristoforo: "but here is my take...there are 2 hashes" - (ME: I was tring to be 'simple' and
             stay with only one hash.  Also, regEx's are still a bane to me (apologies to Friedl
             and Goyvaerts))

wol:    avoid using a => in a hash key, Welcome to Perl :-) (ME: you have a wicked sense of humor - no?)

johngg: I think there has been some confusion caused by one of the variable names you have chosen. (ME: Concur)
        the issue of the fat comma (=>) in your hash key (ME: Yes, I was tring to define the hash key
        "on the fly" with concatenation and should have been using "interpolation" as you have suggested)
        see perlreftut and perlref.(ME: references I dig (60's lingo))
        (ME: "The Output" that you present appears to be exactly what I was trying to accomplish!)

For ALL: my sincerest thanks for your time and effort on my part, and now that I not as "new to Perl" as
I 'once' was, perhaps someone may present a thorny problem for which I may be of some assistance.  Thank You.
Thomas
  • Comment on Re^2: Brain muchly befuddled by nested hashes