programming-examples/perl/Statement/Using foreach to loop through an array without using the default value.pl
2019-11-15 12:59:38 +01:00

9 lines
138 B
Perl

#!/usr/bin/perl -w
use strict;
my $element;
foreach $element ('zero', 'one', 'two') {
print "the element is: $element\n";
}