programming-examples/perl/Statement/Using my inside for statement.pl

5 lines
113 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$factorial = 1;
for (my $loop_index = 1; $loop_index <= 6; $loop_index++) {
$factorial *= $loop_index;
}