![]() |
|< 1 2 >| | ![]() |
17 Einträge, 2 Seiten |
QuoteDu musst doch schon vorher wissen, welche Pattern du hast, oder? Wenn nicht, dann musst Du hier mal deutlicher darlegen, welche Informationen Du hast...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
my %hash;
$hash{test001}=['NAME11', 'NAM13'];
$hash{test002}=['Name12'];
my @array = qw(NAME13 NAME14 NAME15);
for my $key(keys %hash){
if(grep{my $i = $_; defined $i and grep{$_ eq $i}@array}@{$hash{$key}}){
print Dumper($hash{$key});
}
}
Use of uninitialized value in string eq at skript.pl.
push(@result, @{$hash{$key}});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$VAR1 = [
'NAME11',
'NAME11',
'NAME13',
'NAME13'
];
$VAR1 = [
undef,
undef,
undef,
'NAME12',
'NAME12',
'NAME12',
'NAME13',
'NAME13',
'NAME13'
];
1
2
3
4
5
6
7
8
9
my %seen = ();
my @uniq;
foreach my $array (@result) {
foreach my $item (@{$array}) {
push(@uniq, $item) unless $seen{$item}++;
}
}
@uniq = sort keys %seen;
print "@uniq\n";
![]() |
|< 1 2 >| | ![]() |
17 Einträge, 2 Seiten |