foreach $line (@file) {
$line =~ s/;(.*)/;/;
if ($1 ne "") {
print "rausgefiltert: $1
" if ($debug == 1);
$fcnt2 ++;
}
if ($line =~ /^use\s(.*);/) {
print "rausgefiltert: $line
" if ($debug == 1);
next;
}
if ($line =~ /^insert into psm set galaxy="\d", system="\d+", planet="\d+".*;/) {
print DAT $line;
} elsif ($line =~ /^delete from psm where galaxy="\d" and system="\d+";/) {
print DAT $line;
} else {
print "rausgefiltert: $line
" if ($debug == 1);
$fcnt ++;
next;
}
}