monk2b has asked for the wisdom of the Perl Monks concerning the following question:
What are the benefits of using one of the DB modules like DBI as opposed to just making a mysql connection like this.
I know there must be real good reasons not to do this but the only thing that I can come up with is "it is bad practice to place the user name and password in the script". There has to many more drawbacks than that right?my $conn = qq|mysql -u ro_user -ppassword -e|; my $query = qq|show tables LIKE '\%jobs_finished\%'|; my $cmd = qq|$pre "$query" table_name|; open(TABLES, "$cmd|");
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What use DBI?
by tobyink (Canon) on Mar 12, 2013 at 20:40 UTC | |
Re: What use DBI?
by moritz (Cardinal) on Mar 12, 2013 at 21:07 UTC | |
Re: What use DBI?
by blue_cowdawg (Monsignor) on Mar 12, 2013 at 20:33 UTC |
Back to
Seekers of Perl Wisdom