Thread sed-Kommando aus Perl-Skript aufrufen? (5 answers)
Opened by Duff at 2008-04-02 12:17

Dubu
 2008-04-27 20:51
#108912 #108912
User since
2003-08-04
2145 Artikel
ModeratorIn + EditorIn

user image
Vor allem nehme ich an, eine Perl-Lösung wäre offensichtlicher, Speicher schonender und schneller:
Code (perl): (dl )
1
2
3
4
5
6
7
8
...
my %textinhalte;
open my $fh, '<', $FILE or die "cannot open $FILE: $!";
while (<$fh>) {
    $textinhalte{$1}++ if m~<text:text>(.*)</text:text>~;
}
close $fh;
print "Anzahl unterschiedlicher Inhalte: ", scalar keys %textinhalte;

View full thread sed-Kommando aus Perl-Skript aufrufen?