in reply to How to disable:Odd number of elements in hash assignment warning?

Hidden in the doc for warnings is this:

To determine which category a specific warning has been assigned to see perldiag.

And in perldiag it says:

Odd number of elements in hash assignment

(W misc) You specified an odd number of elements to initialize a hash, which is odd, because hashes come in key/value pairs.

So, the answer would seem to be "misc".

  • Comment on Re: How to disable:Odd number of elements in hash assignment warning?

Replies are listed 'Best First'.
Re^2: How to disable:Odd number of elements in hash assignment warning?
by BrowserUk (Patriarch) on Sep 23, 2016 at 16:17 UTC
    the answer would seem to be "misc".

    That indeed does it. Thank you.

    And especially thankyou for the pointer to perldiag. I may have been in there at some point in the past, but I do not recollect it.

    I'd looked at the perllexwarn, and the warnings pages, but neither (of the version of perl I was referencing) contain any reference to perldiag. I guess I should update the url in the pinned tab I have for the docs in my browser to a newer version.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.