#!/usr/bin/perl use DBI; use warnings 'all'; use strict; my $dbh = DBI->connect(...) || die("could not create handler: ", $DBI::errstr); my $sth = $dbh->prepare(q{ SELECT Name, Price, Description FROM Products ORDER BY Name, Price }) || die("could not prepare product listing: ", $dbh->errstr); $sth->execute || die("could not execute product listing: ", $sth->errstr); my($name, $price, $description); $sth->bind_columns(\($name, $price, $description)); while($sth->fetch) { print "