in reply to -w in production environment
I am however surprised about the suggested "fixes" several of the previous posters gave. Just checking whether $USER {coffee} exists or is defined fixes all possible warnings! Sure, it avoids the use of uninitialized value warning, but clearly, the form input hasn't been checked for sanity! What if $USER {coffee} contains Java? Argument "java" isn't numeric in numeric gt isn't much better as warning message.
You cannot trust form input. Don't assume it's there, and don't assume it's in the format you want it to be. Don't assume it's a number just because you are going to use it as a number.
-- Abigail
|
|---|