use strict; use warnings; my @text; $text[0] = '0. Text'; $text[1] = '1. Text'; $text[2] = '2. Text'; $text[3] = '3. Text'; # alternativ und kürzer # my @text=( '0. Text', '1. Text', '2. Text', '3. Text'); foreach my $item (1..3) { print "Item : $item\n"; print "Inhalt: ".$text[$item]."\n"; } # foreach __END__ Item : 1 Inhalt: 1. Text Item : 2 Inhalt: 2. Text Item : 3 Inhalt: 3. Text