in reply to DBI::mysql error handling
my $hash_ref; ... $hashref = $dbh->selectall_hashref($sql, 'filename', ... [download]