diff options
| -rw-r--r-- | Aufgabe3/skript3.pl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Aufgabe3/skript3.pl b/Aufgabe3/skript3.pl index 68ed536..3cc642d 100644 --- a/Aufgabe3/skript3.pl +++ b/Aufgabe3/skript3.pl @@ -49,24 +49,22 @@ my %german; while (my $line = <$germanFile>) { + chomp $line; $german{uc $line} = 0; } close $germanFile or warn "$0 : failed to close input file '$german_file_name' : $!\n"; -my @loesung; - while (my $line = <$INPUTPIPE>) { + chomp $line; if (exists $german{uc $line}) { - push @loesung, uc $line; + printf $OUTPUTPIPE "%s\n", uc $line; } } -print $OUTPUTPIPE @loesung; - close $OUTPUTPIPE or warn "$0 : failed to close pipe > $OUTPUTPIPE_command < : $!\n"; close $INPUTPIPE |
