use DBI qw(:sql_types); $dbh->{unicode} = 1; my $sth = $dbh->prepare ("INSERT INTO mytable (blobcolumn) VALUES (?)"); $sth->bind_param(1, $binary_data, SQL_BLOB); # binary_data will # be stored as-is.