We've all seen and probably pounded the table a few times when that "Use of uninitialized value" warning pops up. Recently a worker in our group ran a script I wrote and got that warning due to an unforeseen circumstance. Unfortunately since the script continues to run, the caller was prompted to save his changes and he did. The result was corruption of data in a file since it was the missing value that caused the warning in the first place. In this case, the problem was annoying but not critical but it made me wonder if there is a way to cause a perl program to die if that condition exists? Usually, the uninitialized value condition is unexpected so it is not likely that one can anticipate every possibility that could cause it but in this case, the script would have failed in a safe condition rather than just grinding on as if all was well. Good practices keep this sort of thing to a minimum but I like to protect people from themselves whenever possible. The condition that caused this incident was not the caller's fault but I can't believe that he saw this warning and went ahead to answer a prompt to finish.
What would be good would be some sort of flag that a warning occurred and then one could disable any part of the program that would be dangerous while allowing safer parts to run. Thanks for all constructive suggestions. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/