next up previous contents
Next: -n: Automatic while-loop Up: Command Line Flags Previous: Command Line Flags   Contents


-w: Show Warnings

As mentioned in Section 1.2, the perl interpreter is invoked every time your perl script is executed, unlike a compiled program, which only invokes the compiler once, and then runs without need for the compiler. Because of this, by default perl doesn't warn you about everything that might be wrong with your program, because, for example, if you had a small problem in your program, and the statement in the problem happened to be inside of a loop, the interpreter might print a warning message thousands of time. Most experienced perl programmers get in the habit of running their programs at least once with the -w flag invoked, and making sure that they understand the output from the interpreter in this case.



Phil Spector 2002-10-18