in reply to Dangers of decode_json? or a hash entry is both defined and undefined. WTF?

I can't help but noticing in your code examples the lack of:
use strict; use warnings;
I'd like to assume, but I've wasted hours (and been to WTF!! and back), before only to realize I didn't add those 2 lines.