in reply to How to find MySQL database exist or not
edi:
I'd make the following change:
if (defined $dbh) { print "Table does not exist.\n"; }
The version you have checks whether $dbh is 0. (Had you used eq instead of ==, it would have checked whether $dbh contained the string 'undef'.)
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How to find MySQL database exist or not
by JavaFan (Canon) on Sep 01, 2011 at 15:57 UTC | |
by roboticus (Chancellor) on Sep 01, 2011 at 16:07 UTC | |
by choroba (Cardinal) on Sep 01, 2011 at 16:09 UTC | |
by edi (Initiate) on Sep 02, 2011 at 11:16 UTC | |
Re^2: How to find MySQL database exist or not
by edi (Initiate) on Sep 02, 2011 at 11:12 UTC | |
by Marshall (Canon) on Sep 03, 2011 at 04:06 UTC |
In Section
Seekers of Perl Wisdom