Thread hash of arrays: Ist ein String in mehreren Arrays ? (9 answers)
Opened by schnuffi at 2003-11-10 17:12

format_c
 2003-11-10 17:37
#70873 #70873
User since
2003-08-04
1706 Artikel
HausmeisterIn
[Homepage] [default_avatar]
Code: (dl )
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
use strict;

my %tosca =(
kein => ["Linux","HP","Sun","IBM","SGI"],
tosca45 => ["Linux","HP","Sun","IBM","SGI"],
tosca451 => ["Linux","HP","Sun","IBM"],
tosca452 => ["Linux","HP","Sun","IBM","SGI"],
tosca50 => ["Linux","HP","Sun","IBM","SGI"],
tosca50B => ["Linux","HP","Sun","IBM","SGI"],
);



my %solver =(
Nastran => ["Linux","HP","Sun","IBM","SGI"],
Solver1 => ["Linux","HP","Sun","IBM","SGI"],
Solver2 => ["Linux","HP","Sun","IBM","SGI"],
Solver3 => ["Linux","HP","Sun","IBM","SGI"],
Solver4 => ["Linux","HP","IBM","SGI"],
Solver5 => ["Linux","HP","Sun","IBM","SGI"],
Solver6 => ["Linux","HP","Sun","IBM","SGI"],
);

my $tosca = 'tosca451';
my $solver = 'Solver4';

for my $name (@{$tosca{$tosca}}) {
print "$name\n" if grep($name eq $_,@{$solver{$solver}});
}
_ _ END _ _
Linux
HP
IBM


TIMTOWTDI

Gruß Alex

View full thread hash of arrays: Ist ein String in mehreren Arrays ?