use DBI qw( :sql_types ); # Lots of code here ... my $stmt = "INSERT INTO project_figures (pjfg_id, pjfg_name, pjfg_image) VALUES(:1,:2,:3)"; my $sth = $dbh->prepare($stmt); $sth->bind_param( 1, 1 ); $sth->bind_param( 2, 'picture1.wmf' ); $sth->bind_param( 3, 'picture1.wmf', { db2_file => 1 ) ); my $rc = $sth->execute();