programming-examples/perl/Statement/foreach statement with number range.pl

9 lines
121 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
my $number;
foreach $number (1 .. 10) {
print "the number is: $number\n";
}