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
while ( <lesen2> ) {
push @lines, $_;
my $Datum = $_ if m/Date: /;
my $Zeit = $_ if m/Zeit: /;
push @lines, $_;
$Zeit =~ s/\D//g;
#generierung von einem key
my $dt = "serapis1".substr($Datum, 12, 4).substr($Datum, 9, 2).substr($Datum, 6, 2).$Zeit;
if ( /^\s*$/ ) {
if ($errorFound eq 1) {
my %hashref = ($dt => @lines);
@lines = '';
$errorFound = 0;
}
}
$errorFound = 1 if /Severity: Error/;
m/NullPointerException/;
$LockedPinException++ if m/LockedPinException/;
$AuthenticationException++ if m/AuthenticationException/;
$Exception++ if m/\.Exception/;
$NoSuchElementException++ if m/NoSuchElementException/;
$RemoteException++ if m/RemoteException/;
}
while (($dt, @lines) = each %ENV) {
print OUT "$dt => @lines\n";
}
bekomme hier und bei der while -schleife ein fehler meldung: Global symbol "$dt" requires explicit package name at trxLogParser_2006-05-19.pl line 173.
edit pq: quote-tags um den
code herum in
code-tags verwandelt.\n\n
<!--EDIT|pq|1148311754-->