#!/usr/bin/perl # this can be used to send encoded info to a stored procedure # eliminating the problems with escaping text (especially strings # with single and double quotes. # the stored proc would have to accept a varbinary as the input # and then convert it to a varchar use strict; use Sybase::Simple; use Data::Dumper; my $dbh = new Sybase::Simple 'user', 'password', 'dbname'; my $sql = 'exec binary_test @data = ' . "0x" . unpack ( "H*", '"testing"' ); my $data = $dbh->HashRow($sql); print dumper($data);