#!/usr/bin/perl use DBI; use warnings 'all'; use strict; no strict 'refs'; # Ni! 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); $sth->bind_columns( map { \${"main::$_"} } # `my' isn't going to cut it @{ $sth->{NAME_lc} } # who knows where this is going to run? ) || die("unable to bind columns: ", $sth->errstr); while($sth->fetch) { print "