Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Trying to understand hashes (in general)by FloydATC (Deacon) |
on Dec 23, 2014 at 08:30 UTC ( [id://1111154]=note: print w/replies, xml ) | Need Help?? |
I am trying my best to understand exactly how to add just a key without a value to a hash. Although not actually very useful in the real world, this can be accomplished by simply assigning undef to a hash key. The key will then exist:
What I am going to eventually shoot for, is making a hash of hashes To accomplish this, you would make the value of your outer hash (of hashes) a reference to the inner hash, like so:
Or you could use references all the way to begin with: (Notice the curly brackets)
-- FloydATC
Time flies when you don't know what you're doing
In Section
Seekers of Perl Wisdom
|
|