# Connect to the database, (the directory containing our csv file(s)) my $dbh = DBI->connect("DBI:CSV:f_dir=.;csv_eol=\n;"); # Associate our csv file with the table name 'results' $dbh->{'csv_tables'}->{'results'} = { 'file' => "psinfooutputdiskfile.csv"}; my @rows = $dbh->selectrow_arrayref("SELECT IP, SUM(PartitionSize), SUM(PartitionFree) FROM results GROUP BY IP"); print ("@rows\n"); # Just here to view output #### SQL ERROR: Can't find table names in FROM clause! Execution ERROR: No command found!. #### my @rows = $dbh->selectrow_arrayref("SELECT IP FROM results");