#!perl -w use strict; use warnings; #Zeilen und Spaltenzahl wird durch den User definiert: my $z; print "Breite?"; $z = ; my $s; print "Hoehe?"; $s = ; my $test; $test = 1; do { $b = 1; while ($b <= $s) { $a = 1; while ($a <= $z) { if ($a == 1 and $b == 1) { print "* "; } else { print ". "; } $a++ } print "\n"; $b++ } my $befehl; print "Befehl? (1=Nord,2=Ost,3=Sued,4=West,5=Quit)"; $befehl = ; if ($befehl == 5) { print "Programm wurde beendet"; $test++; } elsif ($befehl == 1 or 2 or 3 or 4) { print "ok"; } } while ($test == 1)