Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You declared (or whatever use utils did) a hash called %ERRORS.
Yet later in the code, though you would like to get value of key CRITICAL of that hash, you used name ERRORS in this way and didn't know about it: {"CRITICAL"} is resolved as a block that returns value of its last expression, i.e. string "CRITICAL"; this value is considered to be a class name, and ERRORS as a method from this class; so, you're calling method ERRORS of class CIRITCAL, what would be rewritten like CRITICAL->ERRORS();. Hope this haven't confused you too much :-) Perl on. In reply to Re: use of strict ....
by holcapek
|
|