#!/usr/bin/perl use DBI; $dbh = DBI->connect("DBI:CSV:f_dir=csvdb") or die "Cannot connect: " . $DBI::errstr; $dbh = DBI->connect("DBI:CSV:"); $dbh->{'csv_tables'}->{'index'} = { sep_char => " ", quote_char => undef, eol => undef, escape_char => undef, always_quote => 0, file => 'test.txt', col_names => ["pos", "qnt", "part", "housing"] }; my $sth=$dbh->prepare("SELECT * FROM index"); $sth->execute() or die "Cannot execute: " . $sth->errstr(); while (my @ausgabe = $sth->fetchrow_array) { print $ausgabe[0]."\t".$ausgabe[1]."\n"; } $sth->finish(); $dbh->disconnect();