Cleaning up a perl program (using strict); resources? (was: Solved (very odd!?) was: Losing a file handle in perl)

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed Dec 15 01:54:46 UTC 2004


Stewart C. Russell wrote:
> Lennart Sorensen wrote:
> 
>>
>> perl doesn't do that as far as I know (unless that is one of the
>> things -w tells you about).
> 
> 
> There is no valid excuse for not having:
> 
> use strict;
> use warnings;
> 
> in your Perl programs. Ever.
> 
>  Stewart
> 
> (well, perhaps in throwaway one-liners, but I've seen them integrated 
> into production systems ...)

Hi,

   Well, I have heard so many people echo the same thing but until now I 
was more concerned with "making it work". Now it works though and I am 
pretty heavily re-writting the code. I decided that since I just 
finished the re-write of the second major section of the program and 
have a few sections (separate files) still to do now would be a good 
time to enable 'use strict;' and 'use warnings;'.

   Doing this has thrown a LOT of errors and warnings which I now need 
to work through. Can you recommend resources I could read that would 
help me decypher these errors and warnings? For example, I am getting 
stuff like:

Global symbol "$say_type" requires explicit package name at 
/usr/share/tle-bu/cgi-bin/part-conf.cgi line 1002.

and

Bareword "true" not allowed while "strict subs" in use at 
/usr/share/tle-bu/cgi-bin/part-conf.cgi line 134.

   Thanks again!

Madison
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list