in reply to used only once warning
Having said that, your program contains the mentioned variables once. Since it's possible in Perl to use a variable without declaring it, a typo in a variable name is still a valid program. Therefore, at compile time, Perl issues a warning if it sees a variable that's used only once - it's a strong indication the programmer made a typo.
I presume that either cfg.pl or db.pl set the variables?
Perhaps the best way to deal with this is to get rid of the perl4 style of coding, and use perl5 style of coding. Use use to include the other files, and export (using Exporter) the variables to the calling program.
Other alternatives: mention the variables elsewhere in your file, or turn the specific warning off using lexical warnings.
Abigail
|
|---|