#!/usr/bin/perl -w

#
# a subroutine that takes a variable number of arguments
#
sub add {
	local($in, $sum);
	while ($in = shift) {
		$sum += $in;
	}
	return $sum;
}

print add(2, 3 ,4, 5, 6) . "\n";


