Not sure what is going on.
#!/bin/env perl use strict; use warnings; use DBI; my $dbh = DBI->connect('DBI:CSV:'); $dbh->{csv_tables}{info} = { file => '2011-SSCW.csv' }; #Gives 'Not an ARRAY reference at C:\Projects_Perl\SSPH_Results\Muskra +t.pl line 11.' #my @cols = @{$dbh->{csv_tables}}; #print "column names: @cols\n"; my $qu = $dbh->prepare('select * from info'); $qu->execute(); ## for unknown reasons, fetchrow_array returns undef values ## I hacked this in to get the CSV contents while( my @row = grep{defined $_}$qu->fetchrow_array) { print "row: @row\n"; #I get the CSV file ok, here }
In reply to Re^2: CSV column names
by Marshall
in thread CSV column names
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |