summaryrefslogtreecommitdiffstats
path: root/Aufgabe4/skript2.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Aufgabe4/skript2.pl')
-rw-r--r--Aufgabe4/skript2.pl5
1 files changed, 2 insertions, 3 deletions
diff --git a/Aufgabe4/skript2.pl b/Aufgabe4/skript2.pl
index bba74da..14f057f 100644
--- a/Aufgabe4/skript2.pl
+++ b/Aufgabe4/skript2.pl
@@ -37,6 +37,8 @@ open my $german9, '<', $german9_file_name
my @wort = <$german9>;
+chomp @wort;
+
close $german9
or warn "$0 : failed to close input file '$german9_file_name' : $!\n";
@@ -44,9 +46,6 @@ my $schwierigkeitsgrad = 2;
my $index = int rand (int @wort);
my @raetsel = verwuerfeln( $wort[$index], $schwierigkeitsgrad);
-# remove new lines
-chomp @raetsel;
-
for (my $i = 0; $i < 9; $i++)
{
if( $i % 3 == 0)