#!/usr/bin/perl -w

($x, $y) = sumvars(0, 1, 2, 3, 4);
print "The sum of the $y elements is: $x\n";

sub sumvars {
   $sum = 0;
   $n = scalar @_;
   foreach $arg ( @_ ) {
      $sum += $arg;
   }
   return ($sum, $n);
}
