10 Einträge, 1 Seite |
Quote%tosca =(
kein => ["Linux","HP","Sun","IBM","SGI"],
tosca45 => ["Linux","HP","Sun","IBM","SGI"],
tosca451 => ["Linux","HP","Sun","IBM","SGI"],
tosca452 => ["Linux","HP","Sun","IBM","SGI"],
tosca50 => ["Linux","HP","Sun","IBM","SGI"],
tosca50B => ["Linux","HP","Sun","IBM","SGI"],
);
%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","Sun","IBM","SGI"],
Solver5 => ["Linux","HP","Sun","IBM","SGI"],
Solver6 => ["Linux","HP","Sun","IBM","SGI"],
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
my @ar1 = ('eins', 'zwei', 'drei', 'vier');
my @ar2 = ('null', 'vier', 'sieben', 'eins');
my @schnitt = array_schnitt(\@ar1, \@ar2);
print "@schnitt";
sub array_schnitt {
my $ar1 = shift;
my $ar2 = shift;
my @result = ();
for my $elem (@$ar1) {
push @result, $elem if grep $elem eq $_, @$ar2;
}
return @result;
}
1
2
3
4
5
my ($version,$solver) = @ARGV;
my %platforms = map {$_ => 1} @{$tosca{$version}};
my %platforms2 = map {$_ => 1} @{$solver{$solver}};
my @platforms = grep {$platforms2{$_}} keys %platforms;
print "@platforms\n";
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
10 Einträge, 1 Seite |