- foreach
- for
loop over elements of list with foreach
- list
- foreach ITEM (LIST) {BLOCK}
- my - in the foreach loop
examples/perlarrays/list_colors.pl
#!/usr/bin/perl use strict; use warnings; foreach my $color ("Blue", "Yellow", "Brown", "White") { print "$color\n"; }
Blue Yellow Brown White