in reply to DBD:CSV and creating a database

if you add: mkdir($dir,0755) unless( -d $dir ); before your $dbh definition, and a comma after: phone    CHAR(14) it should create $dir . $table for you.

"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Replies are listed 'Best First'.
Re: Re: DBD:CSV and creating a database
by Anonymous Monk on Jan 31, 2003 at 02:02 UTC
    The directory already exists, so I was just checking for the file before trying to add data. It appears I simply missed the comma.

    Is it wrong of me to expect that my create table statment would die and report an error that would be passed back thru Carp? Am I missing something about the way Carp works?

    Besides opening my sleep deprived eyes and catching the missing comma, what else could I have done to trap this error? I would prefer to catch these errors myself than bug other people when I overlook the obvious.

    Gratefully,
    digger