Bryan R Harris wrote: > > Often when debugging my scripts I get: > > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > Use of uninitialized value in print at line 52. > ... > > -- filling up my terminal window. Is there any way to tell perl to quit > when it hits its first uninitialized value (or other) error? >
Yes. They are actually warnings instead of errors. You can either silence them by turning off the uninitialized category, or you can set that category of warnings to be fatal. perldoc perllexwarn For more on dealing with warnings. Optionally you could just check line 52 and see what variable you are using that is uninitialized and either initialize it or check for a value before using it, which would be fixing the problem rather than relieving the symptom. > - Bryan > HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>