Octavian Rasnita wrote at Tue, 04 Jun 2002 08:03:21 +0200: > Hi all, > > I know why I should use "use strict;" but what happen if I use "use strict;" then >if the code is > OK, I delete this line? >
use strict has (e.g.) the benefit for checking for undef values. They can come from the input. (User typed only enter, the file was empty, didn't exist, a library couldn't found, ...) That's no problem when your code works. But anytime, anywhen, that will happen. Without use strict; you will search many months for a simple error. Why ? An undef value means 0, "", (), {}, empty file in the right context. That means your script will at a random point recognise that the values are crazy. So you'll search the error somewhere else where it occurs. And even with use strict; your program won't really be slower. (Perhaps 0.1 %, but in the one week you're searching for errors, the processors have been become quicker (> 0.1 %)). Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]