![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |
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
#!/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\ncall #1";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\ncall #2";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\ncall #3";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\ncall #4";
}
if ( /$xmlstring{'Hzbprtype'}/gs ) {
print "\n$file\ncall #5";
}
}
}
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
#!/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>/s,
);
for my $file ( @files ) {
my @cont = do { local(*ARGV, $_, $/); @ARGV = $file; $/ = "</BaseProduct>"; <>; }
if ( -r $file );
for ( @cont ) {
if ( /$xmlstring{'Hzbprtype'}/ ) {
print "\n$file\ncall #1";
}
if ( /$xmlstring{'Hzbprtype'}/ ) {
print "\n$file\ncall #2";
}
if ( /$xmlstring{'Hzbprtype'}/ ) {
print "\n$file\ncall #3";
}
if ( /$xmlstring{'Hzbprtype'}/ ) {
print "\n$file\ncall #4";
}
if ( /$xmlstring{'Hzbprtype'}/ ) {
print "\n$file\ncall #5";
}
}
}
Quote\n\nIn scalar context, each execution of "m//g" finds the next match,
returning true if it matches, and false if there is no further
match.
![]() |
|< 1 2 >| | ![]() |
14 Einträge, 2 Seiten |