my $data = qq(SELECT FROM db1 name, age, email); my $sth = $dbh->prepare($data); $sth->execute() or die $dbh->errstr; my $data = qq(SELECT FROM db2 height, weight, shoesize); my $sth = $dbh->prepare($data); $sth->execute() or die $dbh->errstr; my ($name, $age, $email, $height, $weight, $shoesize); $sth->bind_colums(\$name, \$age, \$email, \$height, \$weight, $shoesize); while($sth->fetch) { print "$name is $age and at $email. Stands at $height, sits and $weight and kicks puppies with size $shoesize shows\n"; }