CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
run sql queries with perl

 



aueddonline
Novice

Sep 3, 2011, 1:08 PM

Post #1 of 3 (10078 views)
run sql queries with perl Can't Post

I am getting the following error after using 'use Mysql ' in my perl code


Can't locate Mysql.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at ./sqlquery line 3

do I need to download a package or something? Sorry if this is an easy question, just started using perl.


FishMonger
Veteran / Moderator

Sep 3, 2011, 3:04 PM

Post #2 of 3 (10074 views)
Re: [aueddonline] run sql queries with perl [In reply to] Can't Post

Yes, you need to install the module.

However, the Mysql module is depreciated. It's better to use the DBI module along with DBD::mysql.

http://search.cpan.org/~timb/DBI-1.616/DBI.pm
http://search.cpan.org/~capttofu/DBD-mysql-4.020/lib/DBD/mysql.pm


aueddonline
Novice

Sep 3, 2011, 4:56 PM

Post #3 of 3 (10069 views)
Re: [FishMonger] run sql queries with perl [In reply to] Can't Post

Hey I got it working!

Thanks for the links and explanation

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives