use DBI qw(:sql_types); # ... my $sth = $dbh->prepare("insert into demo values (?, ?)"); $sth->bind_param( 1, 'test', SQL_TEXT ); $sth->bind_param( 2, nfreeze($test), SQL_BINARY ); $sth->execute; #### __SIG__ use B; printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE;