my @list = qw/eins zwei drei vier/; for my $foo ( 0 .. $#list ) { print "\$foo = $foo und \$#list = $#list\n"; push @list, $foo; }