#!/usr/bin/perl -w use strict; use DBI qw(:sql_types); my $dbh = DBI->connect('dbi:Sybase:server=SYBASE;database=testdb', 'sa', 'some password'); my $sth = $dbh->prepare("exec spSubComponentAdd \@subComponentName = ?, \@subComponentDescription = ?, \@subComponentId = ? output"); $sth->bind_param(1, "one"); # bind_param() defaults to SQL_CHAR. $sth->bind_param(2, "two"); $sth->bind_param(3, undef, SQL_INTEGER); $sth->execute; my (@data) = $sth->func('syb_output_params'); print "Got @data\n";