in reply to Re^2: Not a HASH reference error
in thread Not a HASH reference error
The significance is that line 56 is the earliest point at which Perl discovers there's a problem with line 55.
Line 55 grabs the value of a hash key. In this case, that hash key does not contain a hash reference (maybe doesn't exist at all). But this is no problem for Perl. If the key doesn't exist, then the value is undef. If it exists but isn't a hash reference, it still causes no problem for line 55. In line 56 you then try to dereference that value as though it were a hash. If the value was undef, that clearly cannot be dereferenced. And if the value was defined, but wasn't a hash ref, you also cannot dereference it as a hash. So at this point Perl has no idea what to do, and complains.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Not a HASH reference error
by briandanderson1977 (Novice) on Feb 24, 2016 at 20:35 UTC | |
by davido (Cardinal) on Feb 24, 2016 at 22:24 UTC | |
by briandanderson1977 (Novice) on Feb 26, 2016 at 19:59 UTC | |
by davido (Cardinal) on Feb 27, 2016 at 03:28 UTC |