Help for this page
my $dbh = "123456"; # just as a test, instead of DBI->connect(....); ... # okay, dbh actually points to a real db connection print "dbh is truly valid"; }
if (!$dbh) { die "no db connection!"; } else { $dbh->run_some_command(); }