use DBI qw(SQL_BLOB); # ... $sth = $dbh->prepare('INSERT INTO test_blob VALUES(?)' ); $sth->bind_param(1, $bindata, SQL_BLOB ); $sth->execute();