I have some code that needs maintaining and rewriting and I am truly a newbie. In the first part of the script I see
my ($Dev,$Inode) = stat("$LOG_DIRECTORY\/$FILE"); $LOG_FILE_HASH{$FILE}->{Current_Dev} = $Dev; $LOG_FILE_HASH{$FILE}->{Current_Inode} = $Inode;
This looks like a dereference for a hash value. But the hash %LOG_FILE_HASH does not appear until later in the code.

With the initial syntax is there an implicit creation of the hash LOG_FILE_HASH, or does it not matter so long as the hash is created at some point in the code. There are no includes, or packages. Just subroutines called in order. When parsing the code the actual hash %LOG_FILE_HASH is in an isolated subroutine about 30 lines later.


In reply to Question about the order of declaring things in perl by mkalas

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.