[Courses] [Perl] Part 1:
Steven Walker
swalk at ya.com
Sat Apr 9 21:13:55 EST 2005
Just letting you know that I am here and following the course as a newbie
to programming. So far it all seems OK and there is not much to say. I am
sure I will be squealing with pain before long :)
My only comment is on the homework average problem. I did this
#!/usr/bin/perl -w
use strict;
my $sum = 23 + 28 + 31 + 17 + 1;
print "The total is $sum \n";
my $mean= $sum / 5;
print "The average is $mean \n";
Which works fine but is a bit of a cop out as I counted the number of items
summed and gave the result to the program. I expect that later in the
course there will be a way of counting the number of entries in a variable.
Steve
More information about the Courses
mailing list