in reply to Inserting data in Mysql

Don't comment out use strict; use warnings;. See the DBI documentation regarding placeholders. You're not checking your inserts work:

my $rows = $dbh->do($statement) or die $dbh->errstr;

Which is also covered in the documentation. For debugging check that you have a value for each of the fields, for example:

Warn "value1: $value1, value2: $value2...";

Replies are listed 'Best First'.
Re^2: Inserting data in Mysql
by moritz (Cardinal) on Dec 03, 2010 at 10:58 UTC
    Or instead of checking for errors, you can use the RaiseError => 1 option in DBI->connect. Very useful, and has all the desired information in the error messages.