Not able to insert data

Hi All,
I enhanced a perl script that creates a table with xyz_yyyymm and insert data from xyz table before truncate xyz.I have tested it successfully in dev but when i ran it on production new table xyz_yyyymm created but did not insert any records from xyz.(No errors were thrown)The perl ran successfully.

Can any one suggest what to do

$sql="select sys_value from syscntrl where sys_typ in ('EOM')";
exec_sql();
$eom=$sth->fetchrow_array();
$sql="create table acct_dnb_$eom unrecoverable as select * from acct_dnb";
exec_sql() ;
$sql="select count(*) from acct_dnb_$eom";
exec_sql();
$rows_returned=$sth->fetchrow_array();
sub exec_sql{
$sth=$dbh->prepare($sql) or mail_abort("dnb_portfolio.pl","cant prepare:\n$sql\n");
$sth->execute or mail_abort("dnb_portfolio.pl","\n$DBI::errstr\n$sql");
}

Regards
Megh

can you post your perl code??