use strict; use warnings; my @liste = (0..10); my $anzahl = @liste; my $last_index = $#liste; print qq~ Anzahl der Elemente: $anzahl Index letztes Element: $last_index ======================== ~; for( 0..$anzahl ){ print 'Element bei 0..$anzahl: ', $liste[$_]," (Index: $_)\n"; } for( 0..$last_index ){ print 'Element bei 0..$anzahl: ', $liste[$_]," (Index: $_)\n"; }