mkalas has asked for the wisdom of the Perl Monks concerning the following question:
I have some code that needs maintaining and rewriting and I am truly a newbie.
In the first part of the script I see
This looks like a dereference for a hash value. But the hash %LOG_FILE_HASH does not appear until later in the code.my ($Dev,$Inode) = stat("$LOG_DIRECTORY\/$FILE"); $LOG_FILE_HASH{$FILE}->{Current_Dev} = $Dev; $LOG_FILE_HASH{$FILE}->{Current_Inode} = $Inode;
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Question about the order of declaring things in perl
by kcott (Archbishop) on Oct 18, 2013 at 04:18 UTC | |
Re: Question about the order of declaring things in perl
by LanX (Saint) on Oct 18, 2013 at 03:03 UTC |
Back to
Seekers of Perl Wisdom