in reply to Long file names in .dbf databases

The issue here has nothing to do with the length of the filename, it has to do with the spaces in it. The issue is delimited identifiers, also called quoted identifiers. It is unrelated to quoting of *values* which is the concern of placeholders and $dbh->quote(). It has to do with allowing non-standard names for tables and columns inside delimiters. Spaces in table names are nonstandard. The SQL standard specifies double-quote " as the delimiter but MySQL uses backticks as well as double-quote, Access uses square brackets, some RDBMSs use single quotes.

DBD::XBase does not support delimited identifiers at all. This is usually not a problem because it also doesn't check to see if the table name is standard SQL, but it won't know how to parse table names with spaces in them.

But since a table name is just a file name in DBD::XBase, why not just write a script to rename the files replacing spaces with underscores, run it on *.dbf, and away you go.

Or, if you really don't want to rename your files, you could patch XBase.pm with this single line at linenum 43 of version 2.40:

$filename =~ s/_/ /g;

Replacing the underscore with any character you'd like and just use that character instead of a space in your SQL e.g. "SELECT * FROM foo_bar_baz.dbf" would find file "foo bar baz.dbf".