use strict; use DBI; my $db="test"; my $host="gmontematorlt.sjcorp.focusframe.com"; my $userid="guest"; my $passwd="password"; my $connectionInfo="dbi:mysql:$db;$host"; # make connection to database my $dbh = DBI->connect($connectionInfo,$userid,$passwd); my $sth = $dbh->prepare ("SELECT name, category FROM animals"); $sth->execute (); print "\n"; print "\n"; while (my ($name, $category) = $sth->fetchrow_array ()) { print " \n"; print " $name\n"; print " $category\n"; print " \n"; } $dbh->disconnect (); print "\n";