programming-examples/perl/Statement/Using foreach to loop through array variable.pl
2019-11-15 12:59:38 +01:00

11 lines
138 B
Perl

#!/usr/bin/perl -w
use strict;
my @array = qw(A B C D);
my $element;
foreach $element (@array) {
print $element, "\n";
}