2011-05-03T16:07:19 Linuxer[code] dein beispiel [/code]
1
2
3
4
5
6
7
8
9
10
11
12
Textblock mit IP (Slot)
Textblock ohne IP (Subslot)
Variable
Variable
Variable
Textblock mit IP
Textblock ohne IP
Variable
Textblock ohne IP
Variable
Variable
...
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
# Open the file for reading.
open DATA, "$data_file" or die "can't open $data_file $!";
foreach(<DATA>)
{
$bla .= $_;
}
@geraeteArray = split(/\nGerät\n/, $bla);
foreach(@geraeteArray)
{
if ($_ =~ m/Allgemeine Projektinformationen/i)
{
next;
}
if ($_ =~ m/\nIP Adresse/i)
{
print DATAOUT "\n";
$sloCnt=0;
foreach(split(/\n/,$_))
{
if ($_ =~ m/IP Adresse/)
{
$_ =~ s/IP Adresse //;
$_ =~ s/^\s+|\s+$//g;
print DATAOUT $_.";0:";
}
}
}
else
{
$sloCnt++;
print DATAOUT $sloCnt.":";
foreach(split(/\n/,$_))
{
if ($_ =~ m/\d\.\d.+\\/)
{
$_ =~ s/^.*?(\w+)[.!?]?\s*$/$1/;
#$_ =~ split(/\\/,$_);
print $_."\n";
}
}
}
print $sloCnt."\n";
}
[/more]