I think this question is a little more subtle because of the way Win32::TieRegistry uses tied hashes as an interface. It's not immediately obvious what happens if multi-level hash keys are used. You can do chaining as if it were a HoH structure, but the documentation seems to imply that the "autovivification" is temporary and is only reflected in the Perl data structure, not the underlying registry.

From the Pod:

$tip18= $Registry->{"LMachine/Software/Microsoft/"}-> {"Windows/CurrentVersion/Explorer/Tips/"}->{"/18"}; Like above, this creates intermediate key objects then uses them t +o access other data. Once this statement finishes, the intermediate k +ey objects are destroyed. Several handles into the Registry are opene +d and closed by this statement so it is less efficient but there are +times when this will be useful.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


In reply to Re^2: In Win32::TieRegistry, what is the best way to tell if a registry variable exists? (vivify) by xdg
in thread In Win32::TieRegistry, what is the best way to tell if a registry variable exists? by DrWhy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.