Anyone see anything wrong with this code? When we execute it (on Linux), we get taken straight to the "Error: Unknown host" block.
Perl is version 5.8.6
$hostname = "host2";
if ($hostname eq "host1") {
$dbhost = 'dbi:Oracle:dbhost1';
}
elsif ($hostname eq "host2") {
$dbhost = 'dbi:Oracle:dbhost2';
}
elsif ($hostname eq "host3" || $hostname eq "host4") {
$dbhost = 'dbi:Oracle:dbhost3';
}
else {
print "ERROR: UNKNOWN HOST\n";
die "Can't connect";
}