#!/usr/bin/perl use strict; use warnings; use DBD::Oracle qw(:ora_types); # Set up any Oracle environment variables needed my $dbh = DBI->connect('dbi:Oracle:db', 'user', 'pass') or die $DBI::errstr; # Get data from file open(my $fh, '<', 'some.file') or die "Unable to open 'some.file' for reading: $!"; binmode $fh; my $blob; { local $/ = undef; $blob = <$fh>; } my $sth = $dbh->prepare("UPDATE table SET col = ?") or die $dbh->errstr; $sth->bind_param(1, $blob, {ora_type => ORA_BLOB}); $sth->execute() or die $dbh->errstr;