programming-examples/perl/Statement/Reference array length in for loop.pl
2019-11-15 12:59:38 +01:00

11 lines
188 B
Perl

#!/usr/bin/perl -w
use strict;
my @names = qw(A B C D);
print "processing using a for loop:\n";
for (my $i = 0; $i <= $#names; $i++) {
print " Hello $names[$i]!\n";
}