|< 1 2 >| | 14 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\nSo weit so gut...";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\nThis is impossible!";
}
Hzbprtype => qr/<kBPrType[^>]*>\s*52\s*<\/kBPrType>/,
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
#!/usr/bin/env perl
use strict;
use warnings;
my @files = @ARGV || glob "*.xml"
or die "No files specified!";
my %xmlstring = (
Hzbprtype => qr/<kBPrType[^>]*>\s*52\s*<\/kBPrType>/,
);
for my $file ( @files ) {
my @cont = do { local(*ARGV, $_, $/); @ARGV = $file; $/ = "</BaseProduct>"; <>; }
if ( -r $file );
for ( @cont ) {
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\nThis is impossible!";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\nSo weit so gut...";
}
}
}
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
#!/usr/bin/env perl
use strict;
use warnings;
my @files = @ARGV || glob "*.xml"
or die "No files specified!";
my %xmlstring = (
Hzbprtype => qr/<kBPrType[^>]*>\s*52\s*<\/kBPrType>/,
);
for my $file ( @files ) {
my @cont = do { local(*ARGV, $_, $/); @ARGV = $file; $/ = "</BaseProduct>"; <>; }
if ( -r $file );
for ( @cont ) {
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\nThis is impossible!";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\nThis is impossible too!";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\nSo weit so gut...";
}
}
}
|< 1 2 >| | 14 Einträge, 2 Seiten |