in reply to Confused about 'Name "main::whenfound" used only once:'

I must admit that whenever I see that error message my brain translates it into something like the following English:

"Name ____ is used uselessly, i.e. before it is assigned to anything in _____.pl at line ____"

(Update: oops that isn't really English -- it's just better "Errormessagese")

Although a typo is the most likely cause, this should in general widen to include such things as "You might have forgotten to initialise it or use it in an assignment that gives it a defined value"

One day maybe they'll teach the Errormessagese language in schools ;)

More update: I also agree with others who advise "use strict" - it might produce even more errors but it's always better to investigate and fix than to hide such errors and remain ignorant of what they are for.

-M

Free your mind

  • Comment on Re: Confused about 'Name "main::whenfound" used only once:'