wie wär's hiermit:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/perl
use strict;
use warnings;
my @Buffer = ();
my $i = 0;
while(my $line = <DATA>){
$Buffer[$i] .= $line;
$i++ if($line =~ /"\$("\s")+"$/);
if($i == 20){
print2File(\@Buffer);
$i = 0;
@Buffer = ();
}
}
sub print2File{
my ($buffer) = @_;
foreach my $set(@{$buffer}){
my (undef,$name,undef) = split(/\n/,$set,3);
($name) = $name =~ /"([^"]+)/;
$name =~ s/\s/_/g;
open(W_FILE,">$name") or die $!;
print W_FILE $set;
close W_FILE;
}
}
"beginn erster Datensatz" "" ""
"matthew01" "" ""
"texttexttexttetx text text" "" ""
"texttext text" "" "98387"
"text, text" "" ""
"text" "" ""
"" "" ""
"text" 0.00 0.00
"$" "" ""
"" "" ""
"matthew02" "" ""
"" "" ""
"texttext text" "5330146514" ""
"" "" ""
"text, text" "" ""
"" "" ""
"text" "30.06.1999" ""
"$" "" ""
"" "" ""
"matthew03" "" ""
"" "" ""
"texttext text" "5330146514" ""
"" "" ""
"text, text" "" ""
"" "" ""
"text" "30.08.2000" ""
"$" "" ""
"" "" ""
"matthew04" "" ""
"" "" ""
"texttext text" "5330146514" ""
"" "" ""
"text, text" "" ""
"" "" ""
"text" "30.08.2000" ""
"$" "" """ ""
"text, text" "" ""
"" "" ""
"text" "30.08.2000" ""
"$" "" """ ""
\n\n
<!--EDIT|renee|1084201894-->