in reply to -w in production environment

I'm not sure if this is a solution you will want to use but here is what I usually do. Instead of
if ($USER{coffee} > 5){ ... }
I would use
if (defined($USER{coffee}) && $USER{coffee} > 5) { ... }
I feel checking defindedness is good thing to do in any case.