5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
my $port = "3030";
if ($port eq "3010"){
my $port2 = "3100";
print $port2;
}
elsif ($port eq "3020"){
my $port2 = "3200";
print $port2;
}
elsif ($port eq "3030"){
my $port2 = "3300";
print $port2;
}
elsif ($port eq "3040"){
my $port2 = "3400";
print $port2;
}
elsif ($port eq "3050"){
my $port2 = "3500";
print $port2;
}
else{
print "no port\n";
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
my %ports = (
3010 => 3100,
3020 => 3200,
3030 => 3300,
3040 => 3400,
3050 => 3500,
);
my $port = "3030";
unless (exists $ports{$port}) {
print "no port\n";
}
else {
my $port2 = $ports{$port};
print $port2;
}
5 Einträge, 1 Seite |