۰۵آذر
#!/usr/local/bin/perl
#
# Compute sum of elements of a list.
# The list will be read from command line arguments.
#
use strict;
use warnings;
sub sum {
my $s = 0;
$s += $_ foreach (@_);
return $s;
}
my $s = sum @ARGV;
print "Sum of [@ARGV] = $s\n";
۹۳/۰۹/۰۵