$dbi = DBI->connect('Blah', 'Blah', 'Blah', 'ODBC'); $sth = $dbi->prepare('select a, b, e, s from MyTable'); $sth->execute; while (my ($a, $b, $c, $d) = $sth->fetchrow_array) { .... }