#!/usr/bin/perl -w
use strict;

my ($sum, $av) = sumarr(0, 1, 2, 3, 4, 5);
print "Sum = $sum, Average = $av\n";

sub sumarr {
   my $sum = 0;
   foreach my $arg ( @_ ) {
      $sum += $arg;
   }
   return ($sum, $sum/scalar @_);
}
