use warnings; use strict; use DBI; my $dbh = DBI->connect("DBI:mysql:database=bing_music_scrape;host=localhost", "root", "", {'RaiseError' => 1}); my $sth = $dbh->prepare("SELECT domain,path FROM Directory WHERE expires <= CURDATE()); "); if (!$sth) { die "Error:" . $dbh->errstr . "\n"; } my $results = $sth->fetchall_hashref([ qw(domain path) ]); print "done!\n"; #### my $results = $sth->fetchall_hashref([ qw(domain path) ]); #### DBD::mysql::st fetchall_hashref failed: statement contains no result [err was 4 now 2000000000] Field 'domain' does not exist (not one of ) at /home/shrikis/workspace/load/janitor.pl line 14. at /home/shrikis/workspace/load/janitor.pl line 14.