Bekomme dann folgende Fehlermeldung:
ll at /home/daniel/scripts/select_db.pl line 32, <STDIN> line 1.
Use of uninitialized value in warn at /home/daniel/scripts/select_db.pl line 32, <STDIN> line 1.
Warning: something's wrong at /home/daniel/scripts/select_db.pl line 32, <STDIN> line 1.
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.
Habe die warnings wie folgt eingebaut (hoffe dass war so richtig):
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 warn $input; warn $match;
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 }
D'OH
Daniel