in reply to Re: Testing if a HoH key exists
in thread Testing if a HoH key exists

What if the key doesn't exist? Will it throw an error? (I would test it but my data is convoluted)

Replies are listed 'Best First'.
Re^3: Testing if a HoH key exists
by hbm (Hermit) on Nov 11, 2011 at 17:29 UTC

    It will not throw an error. Try simply,

    perl -e 'use strict; use warnings; my %H; delete $H{jeri}'
      Thanks, it's working. Sorry if these concepts seem trivial to some people (just judging by my votes). I haven't been programming very long and this is the first time I've worked with HoH. I apologize if I'm being a burden to the forum.
        burden to the forum

        You asked politely, and provided the code and error message in a well-formatted post!

        (Contrast that with gems like "Your<sic> an idiot" from so-and-so earlier in the week...)