#! /usr/bin/perl -w use strict; my @array = qw/ eins zwei drei /; while ( @array ) { my $count = 1; foreach ( @array ) { print $count++, " ", $_, "\n"; } print "Auswahl: "; chomp ( my $aw = ); print "\neins\n\n" if $aw == 1; print "\nzwei\n\n" if $aw == 2; print "\ndrei\n\n" if $aw == 3; exit if $aw eq 'exit'; }