in reply to Why use strict/warnings?
Using strict or warnings doesn't actually improve your script on its own, but it does stop you repeatedly making the most common mistakes. strict forces you to be more, well, strict about your code. For example, you have to localise your variables using local or my before you can use them. This means that you know for sure that you're not overwriting some other important variable that will be used later on in your script, and you're not going to do something with a variable that you assume has no value, but is really 3.14259 and causes seemingly random errors to come up. warnings is a little different, because it doesn't force you to do anything, but it does warn you about stuff that is possibly or probably an error.
Also, if you don't use warnings and strict, and you post something like "why is this failing?", when warnings or strict would have explained what's going on for you, you're probably not going to get much help. At least, you'll get told to use strict a lot. :-)
|
|---|