Note that you can check that with two possibly syntax:
orprint "value undefined" unless defined $hash_plp_lbl_barrel_region_onl +y{$s};
The difference between the two syntaxes is a bit subtle, but not so complicated.print "key does not exist in hash" unless exists $hash_plp_lbl_barrel_ +region_only{$s};
The variable $hash{foo} may have several status.
If the element for key "foo" does not exist at all in the hash, both defined and exists will report a false value.
If the element for key "foo" exists, but the value for that element is not defined, then exists will return a true value, and defined will report false.
I hope this is clear, as I said this is somewhat subtle, but it is important in some cases to understand the difference.
Having said that, it is often not so important, the difference is in many case inexistent, it really depends on how you hash was built in the first place (and how you maintain it).
Well, I hope my explanations are clear, if they are not, please ask, may be an example might be clearer.
In reply to Re^5: Is this a severe error?
by Laurent_R
in thread Is this a severe error?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |