解决方法
是的,这是必要的.
使用严格和使用警告做不同的事情.
从严格模块的手册页:
strict − Perl pragma to restrict unsafe constructs
来自perlrun(for -w):
prints warnings about dubIoUs constructs,such as variable names that are mentioned only once and scalar variables that are used before being set,redefined subroutines,references to undefined filehandles or filehandles opened read-only that you are attempting to write on,values used as a number that don’t look like numbers,using an array as though it were a scalar,if your subroutines recurse more than 100 deep,and innumerable other things.