7.4. Create an Array, loop over with foreachExample 7-2. examples/arrays/list_colors_array.pl #!/usr/bin/perl
use strict;
use warnings;
my @colors = ("Blue", "Yellow", "Brown", "White");
print "@colors\n";
foreach my $color (@colors) {
print "$color\n";
}
Blue Yellow Brown White
|