Re: Perl calculate and average problem
- From: axel@xxxxxxxxxxxxxxxxxxxxxx
- Date: Fri, 30 Sep 2005 14:46:23 GMT
Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx> wrote:
> Let's see if we can dig up something based upon your initial request:
> "calculate the average of the numbers, the total of
> all the numbers added together, and a new array of numbers which is the
> other numbers divided by 2."
> my $sum = 0, $avg = 0;
This should be either:
my $sum = 0, my $avg =0;
or
my ($sum, $avg);
otherwise $avg will fail 'use strict'.
Axel
.
- Follow-Ups:
- References:
- Re: Perl calculate and average problem
- From: ed
- Re: Perl calculate and average problem
- From: Josef Moellers
- Re: Perl calculate and average problem
- Prev by Date: Re: Perl debugging
- Next by Date: FAQ 6.2 I'm having trouble matching over more than one line. What's wrong?
- Previous by thread: Re: Perl calculate and average problem
- Next by thread: Re: Perl calculate and average problem
- Index(es):
Relevant Pages
|
|