> The example does not show the use of the -w switch, but it is used in
> previous examples. If I take out the -w switch it does not show me the
> error, but it still behaves the same.

This is actually quite common when coding in perl.  The -w compile time 
option does a bunch of common logic checking and what not in your code to 
help you detect bugs.  You should always include this in all of the code 
that you write (I believe that Perl 6 will use the -w switch by 
default).   

You can write code that will compile and run just fine but still have 
problems that will trip a -w error message.  For example, you call (i.e., 
declare) variable and then never use it, the -w option will kick out an 
error telling you that the variable in question isn't doing anything for 
you.

Something else that you should always include in your code is the strict 
pragma (e.g., put the statement "use strict" at the top of your code).  
This pragma tells the perl compiler to generate compile codes with unsafe 
programming is detected.  Again, there are tons of examples that will 
compile and run just fine even with errors generated with the strict 
pragma.  

Both -w and use strict will not only force you into good programming 
style and habits, but will save you a tremendous amount of debugging time.


-- 
Greg J. Zartman, P.E.
Vice-President

Logging Engineering International, Inc.
1243 West 7th Avenue
Eugene, Oregon 97402
541-683-8383    fax 541-683-8144


--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to