Hi. You have to install DBI::DBD module. Then in perl use Mysql; $dbh = Mysql->connect(undef,"database","username",'password'); $sql = "select blah from blah"; $sth = $dbh->query($sql); @arr = $sth->fetchrow;
for example if the result is more than one line you have to loop it Ofcoz there is other ways to do it i guess:) /PM\ Andy Cheng wrote: > > Hello, > > I am new to MySql. I have MySql installed in my Linux PC. How do I connect > to MySql using Perl script and assign the result of a query to an array? > Where could I find a sample code? Thank you. > > Andy > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php