summaryrefslogtreecommitdiffstats
path: root/Aufgabe4/skript3.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Aufgabe4/skript3.pl')
-rw-r--r--Aufgabe4/skript3.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/Aufgabe4/skript3.pl b/Aufgabe4/skript3.pl
index 73ecc70..b1b468c 100644
--- a/Aufgabe4/skript3.pl
+++ b/Aufgabe4/skript3.pl
@@ -45,10 +45,16 @@ while (my $wort = <$german9>)
close $german9
or warn "$0 : failed to close input file '$german9_file_name' : $!\n";
-print "Verwürfeltes Wort eingeben: ";
-my $wort = <>;
+my $wort;
+
+do
+{
+ print "Verwürfeltes Wort eingeben: ";
+ $wort = <>;
+
+ chomp $wort;
+}while( $wort !~ /^[\p{L}]{9}$/i );
-chomp $wort;
my $key = make_key($wort);
if(exists $wortliste{$key})