my $dsn = "DBI:mysql:database=$db_cfg->{database};host=$db_cfg->{host};port=3307"; my $dbh = DBI->connect($dsn, $db_cfg->{login}, $db_cfg->{password}); $dbh->{mysql_enable_utf8} = 1; my $sth = $dbh->prepare( "INSERT INTO ReadingGrabCache SET title = ?" ); $sth->execute( $title ) or die $DBI::errstr;