Leser: 2
![]() |
|< 1 2 >| | ![]() |
18 Einträge, 2 Seiten |
31 my ($match) = $input =~ /\.(.+?)\./ if defined $input;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
23 # Funktion zum Ueberpruefen, ob die gewuenschte DB auch konfiguriert ist
24 #
25 sub check {
26 $input=shift;
27 if($input eq '') {
28 print "Es wurde keine DB zum Connecten angegeben!\n";
29 exit 1;
30 } else {
31 #my ($match) = $input =~ /\.(.+?)\./ if defined $input;
32 my ($match) = defined $input ? $input =~ /\.(.+?)\./ : undef;
33 $host="www.$match.de";
34 if ($hash{$match}) {
35 connect_to_db($host,$hash{$match}[0], $hash{$match}[1], $hash{$match}[0]);
36 }
37 }
38 }
1
2
3
4
5
6
Konfigurierten DB's, zu denen eine Verbindung aufgebaut werden kann:
www.domain1.de
www.domain2.de
Bitte eine der oben aufgeführten DB's auswählen: ll
Use of uninitialized value in concatenation (.) or string at /home/daniel/scripts/select_db.pl line 33, <STDIN> line 1.
Use of uninitialized value in hash element at /home/daniel/scripts/select_db.pl line 34, <STDIN> line 1.
my ($match) = defined $input ? $input =~ /\.(.+?)\./ : undef;
1 2 3 4 5 6 7
my $match; if(defined $input){ $match = /.../; } else{ $match = undef; }
![]() |
|< 1 2 >| | ![]() |
18 Einträge, 2 Seiten |