Re: Perl calculate and average problem



Well here is what I have so far:

@params = (1,2,3,4,5,7,8,9);

foreach $digits(@params){
$total = numbers($digits);
print "$numbers\n";
}

sub numbers (){
my $digits = shift(@_);

foreach $params(@params){
$digits =+ @params;
}

return $total
}

I can't get the average of the array to even get to the other part of
the code to divide the total.

.



Relevant Pages

  • Re: Yet more validation ... challenges!
    ... The NI number is validated using data validation, ... hitting delete on a valid postcode does generate the error ... Private Sub Worksheet_Change ... If prev = "" Then ...
    (microsoft.public.excel)
  • Re: Yet more validation ... challenges!
    ... When I close the workbook, whether or not I save it, on opening it again I ... Private Sub Worksheet_Change ... If prev = "" Then ... MsgBox "Invalid postcode, ...
    (microsoft.public.excel)
  • Re: Yet more validation ... challenges!
    ... Private Sub Worksheet_Change(ByVal Target As Range) ... If prev = "" Then ... On Error GoTo EndMacro ...
    (microsoft.public.excel)
  • Re: Required Field for 7 Numeric digits only
    ... Function IsNumber(ByVal Value As String) As Boolean ... > works with verifying that it has 7 digits and is a numeric filled> textbox ... > Private Sub TextBox1_KeyPress ... > Dim IsValid As Boolean ...
    (microsoft.public.excel.programming)
  • RE: Required Field for 7 Numeric digits only
    ... Private Sub TextBox1_KeyPress ... MsgBox "Accounting Unit Code must contain only 7 Digits" ... keep all code pertaining to TextBox1 in the same area. ...
    (microsoft.public.excel.programming)