programming-examples/perl/Statement/Use range operator with for statement.pl
2019-11-15 12:59:38 +01:00

6 lines
87 B
Perl

$factorial = 1;
for (1 .. 6) {
$factorial *= $_;
}
print "6! = $factorial\n";