From adea9e41e25bdd97a7b148ddb6db30e966f8c266 Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Fri, 20 Nov 2015 10:36:39 +0100 Subject: Comp at the right place --- Aufgabe4/skript2.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Aufgabe4') 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) -- cgit v1.2.3-70-g09d2