Derek Byrne wrote:

> Last question on this, but, is there anything I should be aware of if I code
> the Fred prog like this :

Yes

> #!perl -w

use strict;             #  always
use warnings;       #  unless you fully understand why you are turning them off.

The strict and warnings commands will save you a lot of trouble.  They may also
make things harder at first, as you will have to code correctly or raise errors.

> my $add = 4;

use my to indicate that each variable you declare belongs to the current scope,
rather than being inherited from some outer scope.  Always scope your variables
as narrowly as possible.  Also, the coding conventions in Perl call for
lowercase variable names for lexically scoped variables.

> $mul = 2;    # ditto
> ...

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to