in reply to Insert into database table

I would advise to 'use strict;' but also to 'RaiseError => 1'. This will show you the $DBI::errstr (the error encountered).

You'd normally enclose the DBI-calling code in a eval block:

eval { yourDBIsubroutine() }; if ($@) { print "error:\n$@\n" }

From the DBI docs:

If you turn "RaiseError" on then you'd normally turn "PrintError" off. If "PrintError" is also on, then the "PrintError" is done first naturally).

(Try 'perldoc DBI' on the commandline)